// insertAdjacentHTML(), insertAdjacentText() and insertAdjacentElement()
// for Netscape 6/Mozilla by Thor Larholm me@jscript.dk
// Usage: include this code segment at the beginning of your document
// before any other Javascript contents.
if(typeof HTMLElement!="undefined" && !
HTMLElement.prototype.insertAdjacentElement){
HTMLElement.prototype.insertAdjacentElement = function
(where,parsedNode)
{
switch (where){
case 'beforeBegin':
this.parentNode.insertBefore(parsedNode,this)
break;
case 'afterBegin':
this.insertBefore(parsedNode,this.firstChild);
break;
case 'beforeEnd':
this.appendChild(parsedNode);
break;
case 'afterEnd':
if (this.nextSibling)
this.parentNode.insertBefore(parsedNode,this.nextSibling);
else this.parentNode.appendChild(parsedNode);
break;
}
}
HTMLElement.prototype.insertAdjacentHTML = function
(where,htmlStr)
{
var r = this.ownerDocument.createRange();
r.setStartBefore(this);
var parsedHTML = r.createContextualFragment(htmlStr);
this.insertAdjacentElement(where,parsedHTML)
}
HTMLElement.prototype.insertAdjacentText = function
(where,txtStr)
{
var parsedText = document.createTextNode(txtStr)
this.insertAdjacentElement(where,parsedText)
}
}
function cancelEvent(e)
{
if(!e)
e = window.event;
if(e.stopPropagation)
e.stopPropagation();
if(e.preventDefault)
e.preventDefault();
e.cancelBubble = true;
e.cancel = true;
e.returnValue = false;
return false;
}
function toggleDropdown(ddContainer)
{
//alert(ddContainer.childNodes.length);
if(ddContainer.childNodes[ddContainer.childNodes.length-1].style.display=='none')
{
var iFrmae = ddContainer.childNodes[ddContainer.childNodes.length-1]
iFrmae.src=pageBase + "Core/quickimage.aspx?user=" + SelectedUserID + "&image=" + ddContainer.nextSibling.value + "&SpecialOption=Send%20By%20Mail&SpecialOptionImage=sendbymail.gif&nocache=" + new Date();
iFrmae.style.width=ddContainer.scrollWidth;
ddContainer.style.borderBottomColor="#ffffff";
iFrmae.style.display='';
}
else
{
ddContainer.style.borderBottomColor="#000000";
ddContainer.childNodes[ddContainer.childNodes.length-1].style.display='none';
}
}
function selectImage(ddContainer,imageFile,user)
{
if (imageFile.substr(0,1)=="/") var path="";
else
{
if(user) var path=pageBase + "{images}/";
else var path=pageBase + "images/";
}
var imagePath,imagePathBase;
if(user) imagePathBase = path + escape(imageFile) + "?user="+user;
else imagePathBase=path + escape(imageFile) + "?";
ddContainer.nextSibling.value=imageFile;
ddContainer.childNodes[1].src= imagePathBase + "&width=50&height=50&aspectmode=slice&quality=30";
ddContainer.childNodes[2].innerText=imageFile;
toggleDropdown(ddContainer);
}
function playFile(sFilename)
{
var wn = window.open(sFilename,"popupWin","menubar=no, toolbar=no, location=no,scrollbars=yes, status=yes, resizable=yes, width=100, height=100");
}
function pleaseWait()
{
waitDiv.style.display="";
//Used for file upload, maybe a nice animtion would be good here, like a gif or somthing, although dont they stop working when the page starts loading - not sure
}
function fixScroll(scrollContainer) {
s = scrollContainer.scrollTop;
scrollContainer.childNodes[0].focus()
scrollContainer.scrollTop = s;
}
function doCheckout(form)
{
if(confirm("This will complete the order, you will not be able to edit the order after this time."))
{
form.checkout.value="yes";
form.submit();
}
}
var scrollStep = 10;
var scrollDelay = 100;
var slideshowDelay = 5000;
var slideshowFadeTime = 500;
var opacityStep = 5;
var scrollGap = 0;
var continueScroll;
var scrollContainer;
function autoScrollStart()
{
var containers = document.getElementsByTagName("div");
var firstTop;
for(var a=0;a0)
{
scrollStep = containers[a].getAttribute("scrollSpeed")/10;
scrollDelay = 10000 / containers[a].getAttribute("scrollSpeed");
}
}
startScroller(containers[a],true);
/* if(containers[a].scrollHeight > containers[a].offsetHeight * 2)
{
continueScroll=true;
/// scrollFwd(containers[a]);
}
else
{
containers[a].nextSibling.style.display="none";
}
*/
}
if(containers[a].getAttribute("slideShow")=="true")
{
startSlideshow(containers[a],true);
}
}
}
var makeBigger = new Array();
var makeSmaller = new Array();
function startSlideshow(container,fwd)
{
if(fwd) container.setAttribute("direction",1);
if (!document.addEventListener){
document.attachEvent("onmousedown",stopScroll); //MS only
}
else{
document.addEventListener ("mousedown",stopScroll,true);//FireFox...etc.
}
showNextPart( container.id );
}
//Fade functions based on those from http://www.brainerror.net/scripts_js_blendtrans.php
function opacity(containerID, index, opacStart, opacEnd, millisec) {
//speed for each frame
var speed = Math.round(millisec / 100);
var timer = 0;
//determine the direction for the blending, if start and end are the same nothing happens
if(opacStart > opacEnd) {
for(var i = opacStart; i >= opacEnd; i-=opacityStep) {
if(i<=(opacEnd-opacityStep)) i = opacEnd;
setTimeout("changeOpac(" + i + ",'" + containerID + "','" + index + "')",(timer * speed));
timer+=opacityStep;
}
} else if(opacStart < opacEnd) {
for(var i = opacStart; i <= opacEnd; i+=opacityStep)
{
if(i>=(opacEnd-opacityStep)) i = opacEnd;
setTimeout("changeOpac(" + i + ",'" + containerID + "','" + index + "')",(timer * speed));
timer+=opacityStep;
// alert(i);
}
}
}
//change the opacity for different browsers
function changeObjOpac(opacity, object) {
if(opacity==0 && object.style.visibility=='visible') object.style.visibility='hidden';
else{
object.style.visibility='visible';
object.style.opacity = (opacity / 100);
object.style.MozOpacity = (opacity / 100);
object.style.KhtmlOpacity = (opacity / 100);
object.style.filter = "alpha(opacity=" + opacity + ")";
}
}
function changeOpac(opacity, containerID, index) {
var object = document.getElementById(containerID).childNodes[index];
changeObjOpac(opacity,object);
}
function showNextPart(containerID)
{
if(scrollStopped) return;
var container = document.getElementById(containerID);
if(container.getAttribute("direction")) if(container.getAttribute("direction")>0) {
var sliders = container.childNodes;
var frameLink = container.childNodes[container.childNodes.length-1];
var next =0 ;
var current = container.getAttribute("curFrame")*1;
var currentChild = sliders[current];
if(currentChild){
// if (current<2) next=current+1; //<-test line only
if (current0){
container.childNodes[count].style.left=container.childNodes[count-1].offsetLeft+container.childNodes[count-1].offsetWidth;
}
else container.childNodes[count].style.left=0;
}
if(container.childNodes.length >0 && container.childNodes[container.childNodes.length-1].offsetLeft + container.childNodes[container.childNodes.length-1].offsetWidth>container.offsetWidth){
if (!document.addEventListener){
document.attachEvent("onmousedown",stopScroll); //MS only
}
else{
document.addEventListener ("mousedown",stopScroll,true);//FireFox...etc.
}
window.setTimeout("scrollLeft('" + container.id + "')",scrollDelay);
}
else
{
//Top
if(container.previousSibling.previousSibling) container.previousSibling.previousSibling.style.width = container.childNodes[container.childNodes.length-1].offsetLeft + container.childNodes[container.childNodes.length-1].offsetWidth;
//title
container.previousSibling.style.width = container.childNodes[container.childNodes.length-1].offsetLeft + container.childNodes[container.childNodes.length-1].offsetWidth;
//Controls
container.nextSibling.style.display="none";
//Bottom
container.nextSibling.nextSibling.style.width = container.childNodes[container.childNodes.length-1].offsetLeft + container.childNodes[container.childNodes.length-1].offsetWidth;
container.style.width = container.childNodes[container.childNodes.length-1].offsetLeft + container.childNodes[container.childNodes.length-1].offsetWidth;
}
}
function scrollLeft(containerId)
{
if(scrollStopped) return;
var container = document.getElementById(containerId);
if(container.getAttribute("direction")) if(container.getAttribute("direction")>0) {
container.childNodes[0].style.left =container.childNodes[0].offsetLeft - (scrollStep*Math.abs(container.getAttribute("direction")));
for(var count=1;count container.offsetLeft + container.offsetWidth) break;
}
if(container.childNodes[0].offsetLeft + container.childNodes[0].offsetWidth < 0)
{
var firstChild=container.childNodes[0];
container.removeChild(firstChild);
firstChild = container.appendChild(firstChild);
}
window.setTimeout("scrollLeft('" + container.id + "')",scrollDelay);
return;
}
else {
if(container.getAttribute("direction")) {
if(container.getAttribute("direction")<0) {
window.setTimeout("scrollRight('" + container.id + "')",scrollDelay);
return;
}
}
}
window.setTimeout("scrollLeft('" + container.id + "')",scrollDelay);
}
function scrollRight(containerId)
{
if(scrollStopped) return;
var container = document.getElementById(containerId);
if(container.getAttribute("direction")) if(container.getAttribute("direction")<0) {
container.childNodes[0].style.left =container.childNodes[0].offsetLeft + (scrollStep*Math.abs(container.getAttribute("direction")));
for(var count=1;count container.offsetLeft + container.offsetWidth) break;
}
var lastChild=container.childNodes[container.childNodes.length-1];
var firstChild=container.childNodes[0];
if(lastChild.offsetLeft>container.offsetLeft+container.offsetWidth)
{
lastChild.style.left = firstChild.offsetLeft-lastChild.offsetWidth;
container.removeChild(lastChild);
lastChild = container.insertBefore(lastChild,firstChild);
}
window.setTimeout("scrollRight('" + container.id + "')",scrollDelay);
return;
}
else if(container.getAttribute("direction")) if(container.getAttribute("direction")>0) {
window.setTimeout("scrollLeft('" + container.id + "')",scrollDelay);
return;
}
window.setTimeout("scrollRight('" + container.id + "')",scrollDelay);
}
function printThis()
{
var printableUrl = document.location.href;
if(printableUrl.indexOf("__view")>0)printableUrl=printableUrl.replace(/__view=[a-zA-Z_]*/g,"__view=printable");
else
{
if(printableUrl.indexOf("?")>0) printableUrl +="&__view=printable";
else printableUrl +="?__view=printable";
}
window.open(printableUrl);
}
function scrollFwd(container)
{
container.setAttribute("direction",container.getAttribute("direction")-1);
container.setAttribute("oldDirection",container.getAttribute("direction"));
if(scrollStopped)
{
scrollStopped=false;
scrollRight(container.id)
}
}
function scrollBack(container)
{
container.setAttribute("direction",container.getAttribute("direction")+1);
container.setAttribute("oldDirection",container.getAttribute("direction"));
if(scrollStopped)
{
scrollStopped=false;
scrollLeft(container.id)
}
}
function pauseScroll(container)
{
if(container && container.getAttribute("direction"))
{
container.setAttribute("oldDirection",container.getAttribute("direction"));
container.setAttribute("direction",0);
}
}
function resumeScroll(container)
{
if(container && container.getAttribute("oldDirection"))
{
container.setAttribute("direction",container.getAttribute("oldDirection"));
}
}
var importScrollEnabled;
function startImportScroll()
{
importFrame.onfocus = stopImportScroll;
importScrollEnabled=true;
window.setTimeout(scrollImport,1000);
}
function stopImportScroll()
{
importScrollEnabled=false;
}
function tickAllBoxes(tickItem)
{
var inputs = document.getElementsByTagName("INPUT");
for(var a=0;a
" + myProperty + "
" + myObjectRef[myProperty] + "
"
}
// Open a new browser window:
var b=window.open("props.htm","c","")
// Write HTML including a table into our new window, using our string for the table rows with properties:
b.document.write("Object Properties ListProperties list for the object:
" + myString + "
")
}
function Array_pop() {
var response = this[this.length - 1];
this.length--;
return response;
}
function xBrowser()
{
//Array().pop support for IE5
if (typeof(Array.prototype.pop) == "undefined") {
Array.prototype.pop = Array_pop
}
//Adds some usefull stuff to Mozilla et al
//if(Node) Node.prototype.selectSingleNode = function(xpath) { var xpe = new XPathEvaluator(); return xpe.evaluate(xpath, this, xpe.createNSResolver(this), XPathResult.FIRST_ORDERED_NODE_TYPE, null); };
}
function loadHandler()
{
xBrowser();
setTimeout(loadFlash,1);
setTimeout(loadDelayedImages,1);
TagTooga.Mp3.go();
renderFonts();
if(startupMessage.length>0) alert(startupMessage);
if(startupActions.length>0)
{
do
{
var thisAction = startupActions.pop();
window.status="Running action (" + startupActions.length + ") : " + thisAction;
eval(thisAction);
} while (startupActions.length>0)
}
//if (itemsToScroll.length>0)
//{
//for(var a=0;a";
}
if(spans[i].currentStyle && spans[i].currentStyle.fontFamily && spans[i].currentStyle.fontFamily.match("Jenkins v2.0")) {
var w = spans[i].offsetWidth * 0.9;
var h = spans[i].offsetHeight * 1.2;
var c = spans[i].currentStyle.color.replace("#","");
var bg = spans[i].currentStyle.backgroundColor.replace("#","");
var s = spans[i].currentStyle.fontSize.replace("px","") * 1.2;
var text = escape(spans[i].innerHTML);
spans[i].innerHTML="";
}
}
/*
var headers = document.getElementsByTagName("H1");
for (var i=0; i";
}
if(headers[i].currentStyle && spans[i].currentStyle.fontFamily && headers[i].currentStyle.fontFamily.match("Jenkins v2.0")) {
var w = headers[i].offsetWidth ;
var h = headers[i].offsetHeight * 1.2;
var c = headers[i].currentStyle.color.replace("#","");
var bg = headers[i].currentStyle.backgroundColor.replace("#","");
var s = headers[i].currentStyle.fontSize.replace("px","") * 1.2;
var text = escape(headers[i].innerHTML);
headers[i].innerHTML="";
}
}
*/
/*
if(document.body.currentStyle){
var ff=document.body.currentStyle.fontFamily;
}else{
var vw=document.defaultView;
var cs=vw.getComputedStyle(document.body,'');
var ff=cs.getPropertyValue('font-family');
}
alert(ff);
*/
}
function loadDelayedImages()
{
window.status="Loading Images";
var images = document.getElementsByTagName("IMG");
for (var i=0; i")
// objectHTMLWriter.Write("")
injectFlash(moviePlaceholders[i].getAttribute("flashsrc"), moviePlaceholders[i].getAttribute("width"), moviePlaceholders[i].getAttribute("height"), moviePlaceholders[i].getAttribute("bgcolor"), moviePlaceholders[i].getAttribute("flashvars"),moviePlaceholders[i])
}
}
window.status="";
}
function writeFlash(name, width, height, bgcolor, flashvars) {
flashvars = flashvars!=null ? flashvars : '';
var swf = '';
swf += '