/* -- Adobe GoLive JavaScript Library */ function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; } } function changeImagesArray(array) { if (preloadFlag == true) { var d = document; var img; for (var i=0; i 0;} function CSIEStyl(s) { return document.all.tags("div")[s].style; } function CSNSStyl(s) { if (CSIsW3CDOM) return document.getElementById(s).style; else return CSFindElement(s,0); } CSIImg=false; function CSInitImgID() {if (!CSIImg && document.images) { for (var i=0; i= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0)) return true; /* dont follow link */ else return false; /* dont follow link */ } CSStateArray = new Object; CSCookieArray = new Object; CSCookieValArray = new Object; function CSWriteCookie(action) { var name = "DFT" + action[1]; var hrs = action[2]; var path = action[3]; var domain = action[4]; var secure = action[5]; var exp = new Date((new Date()).getTime() + hrs * 3600000); var cookieVal = ""; for(var prop in CSCookieArray) { if(("DFT" + CSCookieArray[prop]) == name) { if(cookieVal != "") cookieVal += "&"; cookieVal += prop + ":" + escape(CSStateArray[prop]); } } if(hrs != 0) cookieVal += "; expires=" + exp.toGMTString(); if(path != "") cookieVal += "; path=" + path; if(domain != "") cookieVal += "; domain=" + domain; if(secure == true) cookieVal += "; secure"; document.cookie = name + '=' + cookieVal; } function CSReadCookie(action) { var name = "DFT" + action[1]; var cookies = document.cookie; if(cookies == "") return; var start = cookies.indexOf(name); if(start == -1) return; start += name.length + 1; var end = cookies.indexOf(";", start); if(end == -1) end = cookies.length; var cookieVal = cookies.substring(start, end); var arr = cookieVal.split('&'); for(var i = 0; i < arr.length; i++) { var a = arr[i].split(':'); CSStateArray[a[0]] = unescape(a[1]); } } function CSDefineState(action) { CSCookieArray[action[1]] = action[3]; } function CSSetState(action) { CSStateArray[action[1]] = action[2]; } function CSInitState(action) { if(typeof(CSStateArray[action[1]]) == "undefined") CSStateArray[action[1]] = action[2]; } function CSCheckState(action) { var obj1 = CSStateArray[action[1]]; var obj2 = action[2]; if(typeof(obj1) == "object") { for(var i=0;i" ) res = (CSStateArray[action[1]] > action[2]); else if(op == ">=") res = (CSStateArray[action[1]] >= action[2]); else if(op == "<" ) res = (CSStateArray[action[1]] < action[2]); else if(op == "<=") res = (CSStateArray[action[1]] <= action[2]); return res; } function frameP(action) { if(parent.frames.length==0) { var fileName=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length); window.location.href=action[1]+"?"+action[2]+"="+fileName; } else { if(top.location.search!="") { var sFrame=top.location.search.substring(1,top.location.search.indexOf("=")); if(name==sFrame) { var sName=top.location.search.substring(top.location.search.indexOf("=")+1,top.location.search.length); var fileName=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length); if(fileName!=sName) { location=sName; } } } } } function CSGotoLink(action) { if (action[2].length) { var hasFrame=false; for(i=0;i'; var type=action[1]; if(type==0 && os=="mac" && browser=="NN" && version==4) { document.write(tag) } else if(type==1 && os=="mac" && browser=="NN" && version==5) { document.write(tag) } else if(type==2 && os=="windows" && browser=="NN" && version==4) { document.write(tag) } else if(type==3 && os=="windows" && browser=="NN" && version==5) { document.write(tag) } else if(type==4 && os=="unix" && browser=="NN" && version==4) { document.write(tag) } else if(type==5 && os=="unix" && browser=="NN" && version==5) { document.write(tag) } else if(type==6 && os=="mac" && browser=="IE") { document.write(tag) } else if(type==7 && os=="windows" && browser=="IE") { document.write(tag) } } function CSHistoryGo(action) { history.go(action[1]); } function CSFieldValidate(action) { var form = action[1]; var elem = action[2]; var theEntry = document.forms[form].elements[elem].value var theFormElem = document.forms[form].elements[elem] var badEntry = "" function theAlert () { alert(action[6]); theFormElem.select(); theFormElem.focus(); } function isEmpty() { if (theEntry == "") { theAlert() } } function isNumber() { if (theEntry == "") { theAlert() } for (i=0; i "9") { badEntry = "notnumber" } } if (badEntry == "notnumber") { theAlert() } } function isAlpha() { if (theEntry == "") { theAlert() } for (i=0; i= "0" && theEntry.charAt(i) <= "9") { badEntry = "notalpha" } } if (badEntry == "notalpha") { theAlert() } } function requiredChars() { numofChars = theEntry.length if (numofChars != action[4]) { theAlert() } } function exactString() { if (theEntry != action[5]) { theAlert() } } function validEmail() { invalidChars = " /:,;" if (theEntry == "") { badEntry = "badEmail" } for (i=0; i < 5; i++) { badChar = invalidChars.charAt(i) if (theEntry.indexOf(badChar,0) > -1) { badEntry = "badEmail" } } atsignLoc = theEntry.indexOf("@",1) if (atsignLoc == -1) { badEntry = "badEmail" } if (theEntry.indexOf("@",atsignLoc+1) > -1) { badEntry = "badEmail" } dotLoc = theEntry.indexOf(".",atsignLoc) if (dotLoc == -1) { badEntry = "badEmail" } if (dotLoc+3 > theEntry.length) { badEntry = "badEmail" } if (badEntry == "badEmail") { theAlert() } } function validCC() { var theNumber = new Array(theEntry.length); var i = 0 var total = 0 for (i = 0; i < theEntry.length; ++i) { theNumber[i] = parseInt(theEntry.charAt(i)) } for (i = theNumber.length -2; i >= 0; i-=2) { theNumber[i] *= 2; if (theNumber[i] > 9) theNumber[i]-=9; } for (i = 0; i < theNumber.length; ++i) { total += theNumber[i]; } isinteger = total/10 if(parseInt(isinteger)!=isinteger) { theAlert() } } var type=action[3]; if(type==0) isEmpty() else if(type==1) isNumber() else if(type==2) isAlpha() else if(type==3) requiredChars() else if(type==4) exactString() else if(type==5) validEmail() else if(type==6) validCC() } function CSCallAction(action) { CSAction(new Array(action[1])); } function CSSWFredirect(action) { if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) { location.href=action[1] } else if (navigator.appName == "Microsoft Internet Explorer") { x = confirm("The page you are trying to view requires the Macromedia Flash (.SWF) browser plug-in. We could not detect if your browser has this plug-in installed. To attempt to view the page anyway, click OK. Otherwise click CANCEL to view an alternate page") if (x == true) location.href=action[1] } else if(action[2] == true) { alert(action[3]) } } CSImages=new Array(); function CSPreloadImage(action) { if (document.images) { CSImages[CSImages.length]=new Image(); CSImages[CSImages.length-1].src=action[1]; } }