siteBase="maggs";siteName="maggs.com";jsFolder="js/dynJS";imageserver="/i";imagefolder="/i";sn="maggs.com";userDir="/users/";loginDir="/memberLogin/";function getBaseDomain(url,returnBase) {url=url.replace(new RegExp(/^\s+/),"");url=url.replace(new RegExp(/\s+$/),"");url=url.replace(new RegExp(/\\/g),"/");url=url.replace(new RegExp(/^http\:\/\/|^https\:\/\/|^ftp\:\/\//i),"");url=url.replace(new RegExp(/^www\./i),"");url=url.replace(new RegExp(/\/(.*)/),"");if (url!=""){var tmpURL=url.split(".");var tmpTXT="";if (returnBase==1){for (i=1; i< tmpURL.length; i++) {if (i!=tmpURL.length&&i>1) {tmpTXT+="."}tmpTXT+=tmpURL[i]}}else{tmpTXT=tmpURL[0]}}return tmpTXT;}function errorbox(msg, url, linenumber){var errwindow=window.open("","","width=300,height=300");errwindow.document.write("<h3>A JavaScript error has occured</h3><br>");errwindow.document.write('The message is " '+msg+'"<br>URL='+url+'<br>Line Number='+linenumber);errwindow.document.close();return true;};function left(str, n) {if (n<=0) {return "";}else if (n>String(str).length) {return str;}else {return String(str).substring(0, n);}}function right(str, n) {if (n<=0) {return "";}else if (n>String(str).length) {return str;}else {var iLen=String(str).length;return String(str).substring(iLen, iLen - n);}}function len(str) {return str.length;}function CBool(value) {value=new String(value);value=value.toLowerCase();if(value=="1"||value=="-1"||value=="true"||value=="yes") {return true;}else {return false;}}function contains(str, toSearch, compare, start) {if(start) {str=str.substring(start, str.length);}if(CBool(compare)||typeof(compare)=="undefined"||compare=="undefined") {try {str=str.toLowerCase();toSearch=toSearch.toLowerCase();}catch(e) {}}if(str.indexOf(toSearch)>- 1) {return str.indexOf(toSearch)+1;}else {return 0;}}function xReplace(checkMe, toberep, repwith) {var temp=checkMe;var i=contains(temp, toberep);while(i>0) {temp=temp.replace(toberep, repwith);i=temp.indexOf(toberep, i+repwith.length );}return temp;}function StripUnsafeCode(incoming) {var returnStr=incoming;returnStr=returnStr.replace(/'/g,"\\'");returnStr=returnStr.replace(/[\r\n\f]/g,"");return returnStr;}function ConvertHTMLToJavascript(html) {var linesize=75;var returnStr='<scri'+'pt language="JavaScript"'+'>\r';var innerStr="";html=StripUnsafeCode(html);for (var i=0; i<=html.length; i+=linesize) {var to=i+linesize;if (to>html.length) {to=html.length;}innerStr+='document.write(\''+(html.substring(i, to))+'\');\r';}returnStr+=innerStr+'</scri'+'pt'+'>';return innerStr;}function sortAsc(a, b) {a=a.toLowerCase();b=b.toLowerCase();if (a>b) {return 1;}else if (a< b) {return - 1;}else {return 0;}}function uCase(what) {return what.toUpperCase();}function lCase(what) {return what.toLowerCase();}var xmlhttp;function loadXMLDoc(url, dowhat) {xmlhttp=null;if (window.XMLHttpRequest) {xmlhttp=new XMLHttpRequest();}else if (window.ActiveXObject) {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}if (xmlhttp !=null) {xmlhttp.onreadystatechange=XMLLoadedFunction;xmlhttp.open("GET", url, true);xmlhttp.send(null);}else {alert("Your browser does not support XMLHTTP.");}}function trim(str) {if (typeof str !="string") return str;str=str.replace(/^\s+|\s+$/g, "");return str;}function isNumeric(strString){var strValidChars="0123456789.-";var strChar;var blnResult=true;if (strString.length==0) {return false;}for (i=0; i< strString.length&&blnResult==true; i++){strChar=strString.charAt(i);if (strValidChars.indexOf(strChar)==-1){blnResult=false;}}return blnResult;}function randomNumber(){return Math.random();}function roundNumber(num,dec) {if (!dec) dec=2return num.toFixed(dec)}function imperialFormat (num){thisNum=num-parseInt(num)if (thisNum=0){return ""}else if (7/8>=thisNum){return "7/8"}else if (6/8>=thisNum){return "3/4"}else if (5/8>=thisNum){return "5/8"}else if (4/8>=thisNum){return "1/2"}else if (3/8>=thisNum){return "3/8"}else if (2/8>=thisNum){return "1/4"}else if (1/8>=thisNum){return "1/8"}}d=document; lH="/"; sH="/";dP=d.location.protocol;dLh=d.location.hostname;dPa=d.location.pathname;dLs=d.location.search;if(dP=='file:'){localCookie=null;}else if ((contains(dLh,'192')>0 )||(contains(dLh,'127.0.0')>0 )||(contains(dLh,'81.86')>0 )||(dLh=='acer')||(dLh=='pavlion' ) ){lH='/';sH='/';}else{lH='http:/'+'/www.'+siteName+'/';if (dP=='https:'){sH='http:/'+'/www.'+siteName+'/' ; isSecure=true;}if (dP=='http:'){sH='http:/'+'/www.'+siteName+'/';}}function changePage(selObj){goTo (getSelectedValue(selObj),1);}function addLoadEvent(func){var oldonload=window.onload;if (typeof window.onload !='function'){window.onload=func;}else{window.onload=function(){if (oldonload){oldonload();}func();}}}function goTo(where,leaveTrace){if (leaveTrace!=0){location.href=where;}else{document.location.replace(where);}}var testAlert=false;function alerter (what){if (testAlert==true) {alert(what)}}localCookie="."+siteName;function ReadJSCookie (key, skips){if (skips==null) {skips=0;}var cookie_string=''+document.cookie;var cookie_array=cookie_string.split ('; ');for (var i=0; i< cookie_array.length;++i){var single_cookie=cookie_array [i] . split ('=');if (single_cookie.length !=2) {continue;}var name=unescape (single_cookie [0]);var value=unescape (single_cookie [1]);if (key==name&&skips --==0){return value;}}return 'None';}function SetJSCookie (name, value){var argv=SetJSCookie.arguments;var argc=SetJSCookie.arguments.length;var expires=(argc>2) ? argv[2] : null;var path=(argc>3) ? argv[3] : null;var domain=(argc>4) ? argv[4] : null;var secure=(argc>5) ? argv[5] : false;cookieToDelete=name+'='+escape (value);cookieToDelete+='; path=/; expires='+setExpiry(-500).toGMTString();document.cookie=cookieToDelete;try {embedCookie(cookieToDelete+'; domain=');embedCookie(cookieToDelete+'; domain='+localCookie);embedCookie(cookieToDelete+'; domain='+document.location.hostname);embedCookie(cookieToDelete+'; domain=.'+document.location.hostname);}catch(e) {alert ('setting cookie error')}cookieToWrite=name+'='+escape (value)+((expires==null) ? '' : ('; expires='+expires.toGMTString()))+((path==null) ? ('; path=/' ) : ('; path='+path.toLowerCase()))+((secure==true) ? '; secure' : '');if (contains(dLh,'.')==0){}else if ((domain==null)||(domain=="")){cookieToWrite+='; domain='+localCookie.toLowerCase();}else{cookieToWrite+='; domain='+domain.toLowerCase();}embedCookie(cookieToWrite);}function embedCookie(what){try{document.cookie=what;}catch(e){alert ('error');}}function SetERCookie (name, value){basicCookie=xReplace(ReadJSCookie("ERSetup"),"ERSetup=","");if (basicCookie=="None"||basicCookie==""){basicCookie="sP=1&sW=1024&sH=768";}bcSplit=basicCookie.split ('&');var cookieBuild="";for (i=0; i< bcSplit.length; i++){if ((bcSplit[i] !="")&&(contains(bcSplit[i],"=")>0) ){thisSplit=bcSplit[i].split("=");varA=thisSplit[0];varB=thisSplit[1];if ((varA.toLowerCase()!=name.toLowerCase())&&(varB!='')&&contains(cookieBuild,varA)==0){if (varB!=''&&contains(cookieBuild,bcSplit[i])==0 ){cookieBuild=cookieBuild+bcSplit[i]+"&";}}else{}}}if ((value!='')&&(name!='')) {cookieBuild+=name+"="+value;}cookieBuild=xReplace(cookieBuild,"&&","&");if (right(cookieBuild, 1)=="&") {cookieBuild=left(cookieBuild,len(cookieBuild)-1);}SetJSCookie ("ERSetup",cookieBuild.toLowerCase(),setExpiry(365))}function ReadERCookie(name){basicCookie=ReadJSCookie("ERSetup");bcSplit=basicCookie.split ('&');var value="";for (i=0; i< bcSplit.length; i++){if ((bcSplit[i] !="")&&(contains(bcSplit[i],"=")>0) ){thisSplit=bcSplit[i].split("=");varA=thisSplit[0];varB=thisSplit[1];if (varA.toLowerCase()==name.toLowerCase()){value=thisSplit[1];}}}return value;}function DeleteCookie(name, tellMe){SetJSCookie (name,'0',setExpiry(-500),'/');if (tellMe==1 ) {alert(ReadJSCookie(name));}}function setExpiry(days){var newExpires=new Date ();newExpires.setTime (newExpires.getTime()+days * (24 * 60 * 60 * 1000));return (newExpires);}function testCookies() {var exp=new Date();exp.setTime(exp.getTime()+1800000);SetJSCookie("cookies", "cookies", exp, false, false, false);if (document.cookie.indexOf('cookies') !=-1) {alert("Got Cookies!");}else {alert("No Cookies!");}exp=new Date();exp.setTime(exp.getTime() - 1800000);SetJSCookie("cookies", "cookies", exp, false, false, false);}function showAllCookies(openNew){}goToURL="";jsTitles="";ver=parseInt(navigator.appVersion);ie4=(ver>3&&navigator.appName=="Microsoft Internet Explorer")?1:0;ns4=(ver>3&&navigator.appName=="Netscape")?1:0;ns3=(ver==3&&navigator.appName=="Netscape")?1:0;function setFixed (){setter=0 ;if (document.all){if (typeof(document.all.floatTop) !="undefined"){document.all.floatTop.style.top=document.body.scrollTop;setter=1 ;}if (typeof(document.all.floatBottom) !="undefined"){document.all.floatBottom.style.top=document.body.scrollTop+document.body.clientHeight-document.all.floatBottom.offsetHeight;setter=1 ;}if (setter==1){setTimeout("setFixed()",0);}}else{}}function emailCheck(emailStr, complain) {emailStr=emailStr.toLowerCase();var checkTLD=1;var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|COM|NET|ORG|EDU|INT|MIL|GOV|ARPA|BIZ|AERO|NAME|COOP|INFO|PRO|MUSEUM)$/;var emailPat=/^(.+)@(.+)$/;var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";var validChars="\[^\\s"+specialChars+"\]";var quotedUser="(\"[^\"]*\")";var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;var atom=validChars+'+';var word="("+atom+"|"+quotedUser+")";var userPat=new RegExp("^"+word+"(\\."+word+")*$");var domainPat=new RegExp("^"+atom+"(\\."+atom+")*$");var matchArray=emailStr.match(emailPat);if (matchArray==null) {if (complain==1) {alert("The Email address you entered seems incorrect (check @ and .'s)");}return false;}var user=matchArray[1];var domain=matchArray[2];for (i=0; i< user.length; i++) {if (user.charCodeAt(i)>127) {if (complain==1) {alert("The username you entered contains invalid characters. Please try again.");}return false;}}for (i=0; i< domain.length; i++) {if (domain.charCodeAt(i)>127) {if (complain==1) {alert("The domain name you entered contains invalid characters. Please try again.");}return false;}}if (user.match(userPat)==null) {if (complain==1) {alert("The username you entered doesn't seem to be valid.");}return false;}var IPArray=domain.match(ipDomainPat);if (IPArray !=null) {for (var i=1; i<=4; i++) {if (IPArray[i]>255) {if (complain==1) {alert("Destination IP address is invalid!");}return false;}}return true;}var atomPat=new RegExp("^"+atom+"$");var domArr=domain.split(".");var len=domArr.length;for (i=0; i< len; i++) {if (domArr[i].search(atomPat)==-1) {if (complain==1) {alert("The domain name does not seem to be valid.");}return false;}}if (checkTLD&&domArr[domArr.length - 1].length !=2&&domArr[domArr.length - 1].search(knownDomsPat)==-1) {if (complain==1) {alert("The email address you enter must end in a well-known domain or two letter "+"country.");}return false;}if (len< 2) {if (complain==1) {alert("This address is missing a hostname!");}return false;}return true;}function writeEmail(address,clickable){if (clickable==1) {document.writeln("<a href='ma"+"ilto:"+(address+"@"+siteName)+"'>");}document.writeln (address+"@"+sn);if (clickable==1) {document.writeln("</a>");}}function writeMailAll(user,domain,tld,clickable) {if (clickable !=0) {document.writeln("<a href='ma"+"ilto:"+(user+"@"+domain+"."+tld)+"'>");}document.writeln(user+"@"+domain+"."+tld );if (clickable !=0) {document.writeln("</a>");}}function getSelectedValue(selObj){if (!(selObj.options[selObj.selectedIndex])){return "";}else{return selObj.options[selObj.selectedIndex].value;}}function getSelectedText(selObj){if (!(selObj.options[selObj.selectedIndex])){return "";}else{return selObj.options[selObj.selectedIndex].text;}}function getCheckedValue(radioObj) {if (!radioObj){return "";}var radioLength=radioObj.length;if(radioLength==undefined){if (radioObj.checked){return radioObj.value;}else{return "";}}for(var i=0; i< radioLength; i++) {if(radioObj[i].checked) {return radioObj[i].value;}}return "";}function getCheckedValueOLD(radioObj) {if(!radioObj){return "";}var radioLength=radioObj.length;if(radioLength==undefined)if(radioObj.checked){return radioObj.value;}else{return "";}for(var i=0; i< radioLength; i++) {if(radioObj[i].checked) {return radioObj[i].value;}}return "";}function setCheckedValue(radioObj, newValue) {if(!radioObj){return;}var radioLength=radioObj.length;if(radioLength==undefined) {radioObj.checked=(radioObj.value==newValue.toString());return;}for(var i=0; i< radioLength; i++) {radioObj[i].checked=false;if(radioObj[i].value==newValue.toString()) {radioObj[i].checked=true;}}}function setCheckedValueOLD(radioObj, newValue) {if(!radioObj){return;}var radioLength=radioObj.length;if(radioLength==undefined) {radioObj.checked=(radioObj.value==newValue.toString());return;}for(var i=0; i< radioLength; i++) {radioObj[i].checked=false;if(radioObj[i].value==newValue.toString()) {radioObj[i].checked=true;}}}function selectValueAndSet(selectName, optionValue,optionText,warnOnSuccess,warnOnFail){selectValueAndSet=false;thisSelectedValue=getSelectedValue(selectName);for(index=0; index< selectName.length; index++){if (optionValue!=""||(optionValue==""&&optionText=="") ){if(selectName[index].value==optionValue){selectName.selectedIndex=index;selectValueAndSet=true;break;}}else if (optionText!=""){if(selectName[index].text==optionText){selectName.selectedIndex=index;selectValueAndSet=true;break;}}else{selectValueAndSet=true;}}if (warnOnFail==1&&selectValueAndSet==false){alert('Failed to update checkbox. sorry.');}else if (warnOnSuccess==1&&thisSelectedValue !=getSelectedValue(selectName)){alert('Updated Checkbox. New value is "'+getSelectedValue(selectName)+'": "'+getSelectedText(selectName)+'"');}return selectValueAndSet;}var cleared=0;function clear_search(which){if(cleared !=1){var s; dS=d.forms.searchengine;if (which==1) {s=dS["search"];} else {s=dS["all"] ;}s.value="";if((navigator.appVersion.indexOf('MSIE')>0)&&(parseInt(navigator.appVersion)>=4)){s.style.color='black';}cleared=1;}}function checkSearchClear(whichBox){if (whichBox.title&&whichBox.value==whichBox.title){whichBox.value="";whichBox.style.color='black';}else if (whichBox.title&&whichBox.value==""){whichBox.value=whichBox.title;whichBox.style.color='';}}function goSearch(which){if (which.value==''){alert('Please enter a search term');which.focus();return false;}else if ((which.value=='Search this site')||(which.value==which.title)){alert('Please clear the search box\nand enter a search term');which.focus();return false;}else{return true;}}function goSearchNew(whichForm){var hasEntries=false;for (var i=0; i< whichForm.length; i++){e=whichForm[i];if (contains(e.type,'text')){if (whichForm[i].title!=""&&whichForm[i].value!=""&&(whichForm[i].title!=whichForm[i].value) ) {hasEntries=true ;break;}}}if (hasEntries==true){for (var i=0; i< whichForm.length; i++){e=whichForm[i];if (contains(e.type,'text')){if (whichForm[i].title!=""&&(whichForm[i].title==whichForm[i].value) ) {whichForm[i].value="";}}}}return hasEntries;}function writeSelecter(incomingArray, selectedArray, multiple, size, clickable, changer, selectName, optionValue, width, noTitle, buttonName) {tmpTXT=('<select name="'+selectName+'" id="'+selectName+'" ');if (size !="") {tmpTXT+=(' size="'+size+'" ');}if (multiple !="") {tmpTXT+=('multiple ');}if (width !="") {tmpTXT+=(' style="width:'+width+';"');}if (changer !="") {tmpTXT+=(changer);}if (clickable==1) {tmpTXT+=(' ondblclick="this.form.submit()"');}tmpTXT+=('>\n');tmpTXT+=('<option value="" style="color:red">'+noTitle+'</option>\n');toWrite="";toWrite+=('<option value="">--------------------</option>\n');for (var i=0; i< incomingArray.length; i++) {toWrite+=('<option value="'+optionValue+incomingArray[i]+'"' );tmpSelected=false;for (var k=0; k< selectedArray.length; k++) {if ((selectedArray[k]==incomingArray[i])&&(selectedArray[k] !='')&&(selectedArray[k] !=null )) {toWrite+=" selected" ;tmpSelected=true ;}}toWrite=toWrite+">";if ((tmpSelected==true)&&(multiple==0)) {toWrite='<option value="'+optionValue+incomingArray[i]+'" selected>&#149; '+incomingArray[i+1]+'</option>\n'+toWrite;}toWrite+=incomingArray[i+1]+'</option>\n';i++;}tmpTXT+=(toWrite+'\n'+'</select>\n');if (buttonName !="") {tmpTXT+=('<br><input type=Submit value="'+buttonName+'">\n');}return tmpTXT ;}function writeSelecterNew(incomingArray, selectedArray, multiple, size, clickable, changer, selectName, optionValue, width, noTitle, buttonName) {tmpTXT=('<select name="'+selectName+'" id="'+selectName+'" ');if (size !="") tmpTXT+=(' size="'+size+'" ');if (multiple !="") tmpTXT+=('multiple ');if (width !="") tmpTXT+=(' style="width:'+width+';"');if (changer !="") tmpTXT+=(changer);if (clickable==1) tmpTXT+=(' ondblclick="this.form.submit()"');tmpTXT+=('>\n');tmpTXT+=('<option value="" style="color:red">'+noTitle+'</option>\n');toWrite="";toWrite+=('<option value="">--------------------</option>\n');for (var i=0; i< incomingArray.length; i++) {toWrite+=('<option value="'+optionValue+incomingArray[i]+'"' );tmpSelected=false;for (var k=0; k< selectedArray.length; k++) {if ((selectedArray[k]==incomingArray[i])&&(selectedArray[k] !='')&&(selectedArray[k] !=null )) {toWrite+=" selected" ;tmpSelected=true ;}}toWrite=toWrite+">";if (tmpSelected==true) {toWrite+='&#149; ';}if ((tmpSelected==true)&&(multiple==0)) {toWrite='<option value="'+optionValue+incomingArray[i]+'" selected>&#149; '+incomingArray[i+1]+'</option>\n'+toWrite;}toWrite+=incomingArray[i+1]+'</option>\n';i++;}tmpTXT+=(toWrite+'\n'+'</select>\n');if (buttonName !="") tmpTXT+=('<input type=Submit value="'+buttonName+'">\n');return tmpTXT ;}function textCounter(f,field,cntfield,maxfield,maxlimit){if (field.value.length>maxlimit){field.value=field.value.substring(0, maxlimit);f[cntfield].value=maxlimit - field.value.length;f[maxfield].value=field.value.length;alert("too many characters!!!");}else{f[cntfield].value=maxlimit - field.value.length;f[maxfield].value=field.value.length;}}function countChars (formName,field,maxLength){if (field.value.length>maxLength){alert('The text you have entered in '+field+'is too long - you are only allowed '+maxLength+' characters - please check the length and try again');return false ;}else {return true;}}function checkSelectsAndGo (whichForm){frm=whichForm;formAction="";if (frm.method=="get"){for (var i=0; i<frm.elements.length;i++){var e=frm.elements[i];if (e.name==''){}else if (contains(e.type,'select')>0){for (x=0; x<e.options.length; x++){if ((e.options[x].selected)&&(e.options[x].value!="")&&(e.options[x].value!="x")){formAction+=e.name+"="+e.options[x].value+"&";}}}else if ((e.type=="checkbox")||(e.type=="radio")){if ((e.checked)&&(e.value!="")){formAction+=e.name+"="+e.value+"&";}}else if (e.name=='nullvalue'){alert ('help');}else if ((e.name!='')&&(contains(e.type,'submit')==0)&&(contains(e.type,'button')==0)&&(e.value!="")){formAction+=e.name+"="+e.value+"&";}else if (e.value!=""){formAction+=e.name+"="+e.value+"&";}else if (e.value==""){}else {}}if (formAction.charAt(formAction.length-1)=="&") {formAction=formAction.substring(0, formAction.length-1);}goURL=frm.action+"?"+formAction;top.location.href=goURL;return false;}else{return true;}}function passwordComplex(val,minLen,numPunc,minDigits){if (!minLen) {minLen=6;}if (!numPunc) {numPunc=0;}if (!minDigits) {minDigits=1;}minAZ=2;UpperandLower=0;if (val.length<minLen) {return false;}if (minAZ&&!/[a-z]/i.test(val)||val.match(/[A-Z]/gi).length< minAZ) {alert('Not enough letters'); return false;}if (minDigits&&!/\d/.test(val)||val.match(/\d/g).length< minDigits ) {alert('Not enough numbers'); return false;}if (UpperandLower>0){if (!/[a-z]/g.test(val)||!/[A-Z]/g.test(val) ) {alert('Not enough uppercase / lowercase letters'); return false;}}if (numPunc>0){if (!/[\.\$\@\£\&\;\%\,\!\:\?]/.test(val)||(val.match(/[\.\$\@\£\&\;\%\,\!\:\?]/g).length< numPunc)){toAlert='Not enough punctuation marks in your password - we require ';toAlert+=numPunc;toAlert+='\n Allowed symbols are \n\n . $ @ £ & ; % , ! : ? ';alert(toAlert);return false;}}return true;}function passwordMatch (whichForm,mainPW,confirmPW,length,punc,digits){if (whichForm[mainPW].value==""){alert ("Please enter a new password."); whichForm[mainPW].focus(); return false;}if (len(whichForm[mainPW].value)<length){alert ("The password you have chosen is not long enough.\n\nYour new password must be at least "+length+" characters long"); whichForm[mainPW].focus(); return false;}if (passwordComplex(whichForm[mainPW].value,length,punc,digits)==false){alert("The password you have chosen is not secure. Please ensure that your password contains at least "+digits+" number and two letters.");return false;}if (whichForm[mainPW].value=='') {alert ("Please enter a new password."); whichForm[mainPW].focus(); return false;}if (whichForm[confirmPW].value !=whichForm[mainPW].value) {alert("The passwords you entered do not match."); whichForm[confirmPW].focus(); return false;}}function getPrompt(intext,displayText){var tmpPrompt=prompt(intext, displayText);if (tmpPrompt !=displayText&&tmpPrompt !="" ){return tmpPrompt;}else{return "";}}function getInnerCnotent(where,andGo){var children=where.getElementsByTagName('a');for(i=0;i<children.length;i++) {toAlert=('child #'+i);toAlert+=(' ,id='+children[i].id);toAlert+=(' ,href='+children[i].href);toAlert+=(' ,className='+children[i].className);toAlert+=('<br>');}alert(toAlert );}function gotoInnerHref(where,andGo){var children=where.getElementsByTagName('a');for(i=0;i<children.length;i++) {if (contains(children[i].href,"http")>0 ){goTo (children[i].href,1);alert(1);return false;}}}function getParentHref(where){var tmpHref=""if (where.parentNode.tagName=="A"){tmpHref=where.parentNode.href}return tmpHref}function updatePageSetHrefs(asdf){var anchors, l;if (MM_findObj("searchOuter") !=""){Danchors=MM_findObj("searchOuter").getElementsByTagName('a');for(l=0; l< Danchors.length; l++){}}return true;}function getFileName(whichFile){var fileAndPath=whichFile;if (contains(fileAndPath,"\\")>0 ){var lastPathDelimiter=fileAndPath.lastIndexOf("\\");}else if (contains(fileAndPath,"/")>0 ){var lastPathDelimiter=fileAndPath.lastIndexOf("/");}else{var lastPathDelimiter=fileAndPath.lastIndexOf("\\");}var fileNameOnly=fileAndPath.substring(lastPathDelimiter+1);return fileNameOnly}function CToggle (where,what){where=document.forms[where]//alert(where+'.'+what)if (where[what].checked==1){where[what].checked=0}else{where[what].checked=1}return false;}function cToggler(which){if (which.checked==1) {which.checked=0} else {which.checked=1};return false;}function MM_jumpImage(targ,selObj,restore){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if (restore) selObj.selectedIndex=0;}function MM_showHideLayers() {var i,p,v,obj,args=MM_showHideLayers.arguments;for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) {v=args[i+2];if (obj.style) {obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v;}obj.visibility=v; alert(v)}}function MM_changeProp(objName,x,theProp,theValue) {var obj=MM_findObj(objName);if (obj&&(theProp.indexOf("style.")==-1||obj.style)){if (theValue==true||theValue==false)eval("obj."+theProp+"="+theValue);else eval("obj."+theProp+"='"+theValue+"'");}}function MM_findObj(n, d) {var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);if(!x&&document.getElementById) x=document.getElementById(n); return x;}function MM_changeProp(objName,x,theProp,theValue) {var obj=MM_findObj(objName);if (obj&&(theProp.indexOf("style.")==-1||obj.style)){if (theValue==true||theValue==false)eval("obj."+theProp+"="+theValue);else eval("obj."+theProp+"='"+theValue+"'");}}function JumpMenu(targ,selObj,restore){if (selObj.options[selObj.selectedIndex].value !=''){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if (restore) selObj.selectedIndex=0;}}function MM_preloadImages() {var d=document; if(d.images){if(!d.MM_p) d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)if (a[i].indexOf("#")!=0){d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}function getElementsByClass(searchClass,node,tag){var classElements=new Array();if (node==null ) node=document;if (tag==null ) tag='*';var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp("(^|\\s)"+searchClass+"(\\s|$)");for (i=0, j=0; i< elsLen; i++){if (els[i].className !=''){if ((pattern.test(els[i].className) )||(contains(els[i].className,"-"+searchClass)>0)||(contains(els[i].className,searchClass+"")>0)){classElements[j]=els[i];j++;}}}return classElements;}function findParent(el,row ){el=uCase(el)current_node=(row);while(current_node.parentNode.nodeName !=el){current_node=current_node.parentNode;}return current_node.parentNode;}function findParentClass(el,row ){el=uCase(el)current_node=(row);while(current_node.parentNode.nodeName !=el){current_node=current_node.parentNode;}return current_node.parentNode.className;}function styleThis(where,el,styler,whatter ){el=uCase(el)current_node=(where);while(current_node.parentNode.nodeName !=el){current_node=current_node.parentNode;}current_node.parentNode.style[styler]=whatter;}function showHideTR(what,doWhat,matchFirst) {if (!doWhat) doWhat=""if (what!="") {if (getElementsByClass(what).length>0){var el=getElementsByClass(what);for (var i=0; i< el.length; i++){sH(el[i],doWhat)}}else if (MM_findObj(what) !=null ){sH(MM_findObj(what),doWhat)}else if (document.getElementById(what) !=null ){sH(document.getElementById(what),doWhat)}else{}}function sH(inObj,doWhat,matchFirst){Match=""if (inObj){obj=inObjif (!obj.style) obj.style=""obj=obj.style;if (obj.display=="" ){v="hide"}else if (obj.display=="inline" ){v="hide"}else if (obj.display=="block" ){v="hide"}else if (obj.display=="none" ){v="show"}else{v="hide"}if (!matchFirst ){Match=v}else if (matchFirst==1&&Match==""){Match=v}else if (matchFirst==1&&Match!=""){v=Match}if ((doWhat !='')&&(typeof(doWhat) !='undefined')) v=doWhatif (v=="show"){obj.opacity=1;obj.filter="Alpha(opacity=100)";obj.display='';obj.visibility=''try {}catch(e) {alert('error')}}else if (v=="hide"){try {obj.display='none';obj.visibility='hidden';}catch(e) {}}alerter=inObj.id+'\ndisplay: '+(getCSSProp(inObj, "display"))alerter+='\nvis: '+(getCSSProp(inObj, "visibility"))alerter+='\n color: '+(getCSSProp(inObj, "color"))alerter+='\n opacity: '+(getCSSProp(inObj, "opacity"))alerter+='\n filter: '+(getCSSProp(inObj, "filter"))}}}function suspendTag (hideTagName,hideClassName,ignoreClass){if (hideClassName&&document.getElementsByClass(hideClassName) !=null ){var eles=getElementsByClass(hideClassName);}else{var eles=document.getElementsByTagName(hideTagName);}for(i=0;i<eles.length;i++){if (eles[i].className!=ignoreClass){eles[i].style.opacity=0.5eles[i].style.filter="Alpha(opacity="+50+")";}}return true;}function unSuspendTag(hideTagName,hideClassName,ignoreClass){if (hideClassName&&document.getElementsByClass(hideClassName) !=null ){var eles=getElementsByClass(hideClassName);}else{var eles=document.getElementsByTagName(hideTagName);}for(i=0;i<eles.length;i++){eles[i].style.opacity=1eles[i].style.filter="Alpha(opacity=100)";}return false;}function insertImage(where){if (MM_findObj('note'+where).innerHTML=="") MM_findObj('note'+where).innerHTML="<a href='redirect.asp?id="+where+"'><im"+"g sr"+"c='"+imageserver+"/affiliates/"+where+".jpg' width='300'></"+"a>"}triggerDiv=""hide2=""function lowlight (what){if (what !=''){theThing=MM_findObj(what)if (theThing !=null){theThing.style.visibility="hidden";theThing.style.display="none";}else if (what !=""){showHideTR(what,'hide')}}}function highlight (what,whither){if (what !=''){theThing=MM_findObj(what)if (theThing !=null){theThing.style.visibility="visible";theThing.style.display="block";}else{showHideTR(what,'show')}}}function triggerOn(whichID){if (triggerDiv!=''){lowlight(triggerDiv);clearTimeout(hide2)}if (whichID!=''){triggerDiv=whichID;highlight(triggerDiv,'l')}}function triggerOff(whichID,howLong){if(!howLong) howLong=2000if (whichID!=''){toDo='lowlight("'+whichID+'")'hide2=setTimeout(toDo,howLong);}}function flipTR (which,what){if (which !='' ){if (what=='show') {triggerOn(which);} else {triggerOff(which);}}return false;}flipTimer=""function flipTRW (which,what,howLong){if (which !='' ){if (what=='show'){flipTimer=setTimeout("triggerOn('"+which+"');",howLong*1000)}else{clearTimeout(flipTimer);triggerOff(which);}}return false;}function getCSSProp (element, prop){if (prop=="className"){tmpTXT=element.className;}else if (element.style[prop]) {tmpTXT=element.style[prop];} else if (element.currentStyle) {tmpTXT=element.currentStyle[prop];} else if (document.defaultView&&document.defaultView.getComputedStyle) {prop=prop.replace(/([A-Z])/g,"-$1");prop=prop.toLowerCase();tmpTXT=document.defaultView.getComputedStyle(element,"").getPropertyValue(prop);} else {tmpTXT="";}return tmpTXT;}function changeClass (inObj,newClass){obj=MM_findObj(inObj)if (!obj) {alert("!obj")}else {obj.className=newClass}}function hideAllLayers() {var eles=document.getElementsByTagName("div");for(i=0;i<eles.length;i++){hideLayer(document.getElementById(eles[i].id))}}function hideLayer(which) {if (MM_findObj (which)){dg=MM_findObj (which);dg.style.visibility="hidden";dg.style.display="none";dg.style.color="rgb(255,255,255)";dg.style.opacity=0;dg.style.filter="Alpha(opacity=0)";}}function startFade(r,g,b,o,incoming) {fadeReal(r,g,b,o,incoming);}function startFadeOut(r,g,b,o,incoming) {fadeReal(r,g,b,o,incoming)}var timer=null;changer=12;changeTimer=5;function showFade(x,what){if (MM_findObj (x)){y=MM_findObj (x);y.style.visibility="visible"; y.style.display="block";maxOpac=0.95;r=g=b=o=0;chR=chG=chB=changer;chO=(chB/255);fadeReal(r,g,b,o,x)}}function hideFade(x,what){y=MM_findObj (x);r=g=b=255;o=0.95;maxOpac=0.95;chR=chG=chB=-changer;chO=(chB/255);fadeReal(r,g,b,o,x)}function fadeReal(Ar,Ag,Ab,Ao,Awhere){where=MM_findObj (Awhere)Ar+=chR; Ag+=chG; Ab+=chB; Ao+=chO;if ((Ar>=0 )&&(Ar< 256 )&&(Ag>=0 )&&(Ag< 256 )&&(Ab>=0 )&&(Ab< 256 )&&(Ao<=maxOpac) ){where.style.color="rgb("+Ar+","+Ag+","+Ab+")";if (Ao>0){ieo=(Ao*100);where.style.opacity=Aowhere.style.filter="Alpha(opacity="+ieo+")";fadeTimer=setTimeout ("fadeReal("+Ar+","+Ag+","+Ab+","+Ao+",'"+Awhere+"')", changeTimer);}else{hideLayer(Awhere)}}else{}}var yMousePos=0 , xMousePos=0function ShowContent(showCont) {if(showCont.length< 1) {return;}insertImage (showCont)showFade('note'+showCont,50)}function HideContent(hideCont) {if(hideCont.length< 1) {return;}hideFade('note'+hideCont,50)lowlight('note'+hideCont)}function ReverseContentDisplay(cont) {if(cont.length< 1) {return;}if(document.getElementById(cont).style.display=="none") {document.getElementById(cont).style.display="block";}else {document.getElementById('note'+cont).style.display="none";}}function Maximize(){sW=screen.availWidth; sH=screen.availHeight;if (ReadJSCookie("sW") !="" ){sW=ReadJSCookie("sW"); sH=ReadJSCookie("sH")}top.window.moveTo(0,0);if (document.all){top.window.resizeTo(sW,sH);}else if (document.layers||document.getElementById){top.window.resizeTo(screen.availWidth,screen.availHeight);if (top.window.outerHeight< screen.availHeight||top.window.outerWidth< screen.availWidth){top.window.outerHeight=top.screen.availHeight;top.window.outerWidth=top.screen.availWidth;}else{}}}function Minimize(){if (document.all){top.window.resizeTo(400,400);}else if (document.layers||document.getElementById){top.window.resizeTo(400,400);if (top.window.outerHeight< screen.availHeight||top.window.outerWidth< screen.availWidth){top.window.outerHeight=400;top.window.outerWidth=400;}}}function checkClose(cN,cV,aV,rel){if (cV !=aV ){alert('your cookie value for '+cN+' is '+ReadJSCookie(cV)+' but should be '+aV+' '+"We had trouble setting the cookies you requested.\n\nPlease check your browser's security settings and try again.")}else if (((document.referrer)||(window.opener))&&(window.name)){if (confirm('Your preferences have been updated. Do you want to return your last page?')){if (window.opener){if (rel==1){window.opener.location.reload();}window.close()}else{MM_openPop(document.referrer,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+ReadJSCookie("sW")+',height='+ReadJSCookie("sH")+'')window.close()}}}else{alert('Your preferences have been updated')}}function checkOpener (url,closeIt){if (window.opener){window.opener.location=url;window.opener.focus()if (closeIt==1 ) window.close()return false}else if (window.name){newW=MM_openPop(url,xReplace(siteName,",",""))if (newW) newW.focus()if (closeIt==1 ) window.close()return false}else{goTo(url,1)return false}}function MM_openBasic(theURL,winName,features){if (!features) {features=basicPopOptions()}if (features=="") {features=basicPopOptions()}newWindow=window.open(theURL,winName,features);if (newWindow) {newWindow.focus()}}function MM_openPop(theURL,winName,features){if (!features) features=basicPopOptions()if (features=="") features=basicPopOptions()var popOpenedpopOpened=window.open(theURL,winName,features)if (!popOpened){theAlert="We tried to open a new window, but something went wrong. \n\n"theAlert+="If you have a popup-blocker in force you may need to disable it, or allow popups for this site. We promise, there\'s no porn in our popups.\n\n "theAlert+="Click OK to let us try again, or click cancel and we'll stop trying to give you useless information. \n\n"if (confirm(theAlert)){popOpened=window.open(theURL,winName,features)}}else{if(window.focus){popOpened.focus()}}}function windowFocus(){window.focus();}function checkThisFocus(){addLoadEvent(windowFocus);alert('');}function checkThisFocus(){window.focus();}function bugReport(bugURL){MM_openPop('/bugs/bugs.asp?url='+bugURL,'bugs',dPopOptions())}function openItThen(){}function dPopOptions (){return "resizable=1,scrollbars=1,status=1,width=600,height=400"}function helpPopOptions (){return "resizable=1,scrollbars=1,status=1,width=600,height=350"}function normalPopOptions (){return "toolbar=1,resizable=1,scrollbars=1,status=1,width=600,height=350"}function basicPopOptions (){return "toolbar=0,resizable=1,scrollbars=1,status=1,width=700,height=500"}function largePopOptions (){return "toolbar=1,resizable=1,scrollbars=1,status=1,width=900,height=700"}function sizePopOptions (){return "toolbar=0,resizable=1,scrollbars=1,status=1"}function chatPopOptions (){return "toolbar=0,resizable=1,scrollbars=0,resizable=1,status=1"}function slideshowPopOptions (){return "location=0,toolbar=0,resizable=0,menubar=0,scrollbars=0,resizable=0,status=1,width="+screen.availWidth+", height="+screen.availHeight}function siteOptions (){return "location=1,toolbar=1,resizable=1,menubar=1,scrollbars=1,resizable=1,status=1"}function setScreenSize(w, h, closeIt) {alerter('sW was '+ReadJSCookie("sW")+'\ntrying '+w+';'+h);SetJSCookie("sW", w, null);SetJSCookie("sH", h, null);if ((window.name)&&(closeIt !=0)) {checkClose("sW", ReadJSCookie("sW"), w, 1)}alerter("sW finally "+ReadJSCookie("sW"));}setScreenSize(screen.width,screen.height,0);if (parent.frames.length>0){if (contains(top.location.hostname,siteName==0)) top.location.replace(document.location)}function openInfo(theURL,winName,features){if ((ReadJSCookie("sP") !="0") ){var helpOpenedhelpOpened=window.open(theURL,winName,features)if (!helpOpened){theAlert="We tried to open a new window with some information about how to use this page, but something went wrong. \n\n";theAlert+="If you have a popup-blocker in force you may need to disable it, or allow popups for this site. We promise, there\'s no porn in our popups.\n\n ";theAlert+="Click OK to let us try again, or click cancel and we'll stop trying to give you useless information. \n\n";theAlert+="You can turn these preferences off and on on the preferences page, to which a link is at the bottom of the navigation bar at left.";if (confirm(theAlert)){window.open(theURL,winName,features) ;}else{SetJSCookie('sP','0',setExpiry(10000),'/',localCookie);}}else{helpOpened.focus();}}return false;}slideshowWindow=''function openSlideShow(){if (slideshowWindow!=''){if (typeof(thisTitleID) !="undefined"){ssWin=thisTitleID;}else if (typeof(thisImageID) !="undefined"){ssWin=thisImageID;}else{ssWin="ssWin";}var slideShowOpened;slideShowOpened=window.open(slideshowWindow+'&width='+screen.width+'&height='+screen.height,ssWin,slideshowPopOptions());if (!slideShowOpened){alert("We tried to open a new window with the image you wanted, but something went wrong. \n\nIf you have a popup-blocker in force you may need to disable it.");}else{slideShowOpened.focus();}}return false;}theNext=thePrevious="";var textFocus=0;var selectedTB='';var doHandle=true;var testing=0 ;var mKey;var sKey;var bookmark="";function getKeyPress(e){if (!e) {e=event; e.which=e.keyCode;}mKey=getModKey(e);sKey=getShiftKey(e);if (document.layers){key=e.which;}else if (document.all){key=e.keyCode;}else{key=e.which;}return key;}function getModKey(e){if (!e) {e=event; e.which=e.keyCode;}tmpBLN=false;try {tmpBLN=e.ctrlKey||e.altKey||e.metaKey ;}catch(e){tmpBLN=false;}return tmpBLN;}function getShiftKey(e){if (!e) {e=event; e.which=e.keyCode;}tmpBLN=false;try {tmpBLN=e.shiftKey ;}catch(e){tmpBLN=false;}return tmpBLN;}function altKey(e){if (!e) {e=event; e.which=e.keyCode;}tmpBLN=false;if(getModKey(e)==true||getShiftKey(e)==true) {tmpBLN=true;}return tmpBLN;}function handler(e) {if (ReadJSCookie("keyboard") !="false"){key=getKeyPress(e)mKey=getModKey(e)sKey=getShiftKey(e)if (key==50&&sKey==true&&mKey==true) {showAllCookies(0); return false;}if (key==53&&sKey==true&&mKey==true) {showAllCookies(1); return false;}if (key==65&&sKey==true&&mKey==true) {aFunction();}if (key==85&&sKey==true&&mKey==true) {uFunction();}if ((key==9)&&(mKey !=true) ){if (tabFunction ()==true) return false;}else if ((key==13)&&(mKey !=false) ){if (returnFunction ()==true) return false;}else if ((doHandle==true)&&(textFocus==0)&&(mKey !=true)){if ((key>=48)&&(key<=57)&&(mKey==false) ){return numFunction(key-48);}else if ((key>=96)&&(key<=105)&&(mKey==false) ){return numFunction(key-96);}else{if ((key==68)&&(bookmark !='')) {dFunction() ;}if ((key==66)&&(bookmark !='')) {bFunction();}if ((key==39)||(key==88)) {rightFunction();}if ((key==37)||(key==90)){leftFunction() ;}if (key==27) {escFunction() ;}if (key==32) {SSFunction();}if (key==70) {fFunction();}if (key==73) {iFunction();}}}}}function cancelHandler() {doHandle=false;}function restartHandler() {doHandle=true;}function tabFunction() {}function returnFunction() {}function aFunction() {}function bFunction() {}function dFunction() {}function uFunction() {}function rightFunction() {}function leftFunction() {}function fFunction() {}function iFunction() {}function SSFunction() {}function escFunction() {}function numFunction() {}if(document.all) {document.onkeydown=handler;} else {window.onkeydown=handler;}function returnI(a,b){return(tN+"book="+a+"&img="+b )}function returnD(w,h){return("&w="+w+"&h="+h)}function mouseOverIt(inComingText){if ((typeof(inComingText)=='undefined')||(inComingText=="")){theIncoming="Click here to view this image at high resolution"}else{theIncoming=inComingText}parent.defaultStatus=theIncoming;return true;}function mouseOutIt(){parent.defaultStatus=d.title; return true;}function setPageTitle(){parent.defaultStatus=d.title; return true;}function doPageStuff (){setPageTitle()setFixed ()}function doOnLoad(){doPageStuff ()}addLoadEvent (mouseOutIt)var isOpera=navigator.userAgent.indexOf('Opera')>-1;var isIE=navigator.userAgent.indexOf('MSIE')>1&&!isOpera;var isMoz=navigator.userAgent.indexOf('Mozilla/5.')==0&&!isOpera;function checkJSImage(){if ((MM_findObj("jsImage")==null)&&(ReadJSCookie("jsImageAlert")!="0")){imageMessage="Sorry, we seem to be having trouble loading images in your browser. \n\nMost pages on our site are filled with pictures - if you can\'t see any, please scroll to the bottom af this page and click the link marked \n\"Image Problems\".\n\n"imageMessage+="Click ok to continue, or click cancel if you don't want to see this message again."if (!confirm(imageMessage)){SetJSCookie('jsImageAlert',0,setExpiry(30),'/',localCookie);}MM_findObj("jsContent").innerHTML='<img src=\n"/errors/jserror.asp?url='+d.location+'|line=0|msg=NoImages:'+MM_findObj("jsImage")+'" id="jsImage" name="jsImage" alt="spacer" width="800" height="10" border="0">'}return false;}function writeSpacer(swidth,sheight){return '<img src="'+imageserver+'/r/spacer.gif" border=0 width='+swidth+' height='+sheight+'><br>'}function swapImage (imageID,newSRC){if(MM_findObj(imageID)){MM_findObj(imageID).src=newSRC}else{}}function swapHTML (divID,newHTML){tmpBLN=falseif(MM_findObj(divID)){MM_findObj(divID).innerHTML=newHTMLtmpBLN=true}else{}return tmpBLN}var imageCounter=0var imageRunning=0var EPSImagesfunction imageChanger(iWhere,startFrom,keepRunning){if (startFrom!=''){imageCounter=startFrom;}else{imageCounter++}imageRunning=0if (imageCounter>=imageArray.length){imageCounter=0;}else if (imageCounter< 0){imageCounter=imageArray.length-1}if (swapHTML("displayImage",MM_findObj(""+imageArray[imageCounter]).innerHTML)==true){if (imageCounter< imageArray.length-1 ){toDo='imageChanger("'+iWhere+'","",'+keepRunning+')'if (keepRunning==1) EPSImages=setTimeout(toDo,5000);}else{stopImageChanger();}}else{alert('crap stop')imageCounter=0}}function mainImageBack(thisWhere){clearTimeout(EPSImages)imageCounter --;imageChanger(thisWhere,imageCounter,0)}function mainImageForward(thisWhere){clearTimeout(EPSImages)imageCounter++;imageChanger(thisWhere,imageCounter,0)}function mainImageToggle(thisWhere,doWhat){if (doWhat=='stop'){stopImageChanger()}else{startImageChanger()}}function startImageChanger(){imageCounter++;imageRunning=1;showHideTR ("stopSlides",'show');showHideTR ("startSlides",'hide');imageChanger("displayImage",0,1)}function stopImageChanger(){imageRunning=0;showHideTR ("stopSlides",'hide');showHideTR ("startSlides",'show');clearTimeout(EPSImages);}function createPCDiv(imgID,bookID,lOffSet,rOffSet,divName,divStyle,divWidth,detailedWrite){mo=' onmouseover="stopImageChanger();showHideTR(\''+divName+imgID+'\',\'show\')" onmouseout="showHideTR(\''+divName+imgID+'\',\'hide\')"'moPC=' onmouseover="stopImageChanger(); showHideTR(\'pcOrderDiv\',\'show\')" onmouseout="showHideTR(\'pcOrderDiv\',\'hide\')"'toWrite='<'+divStyle+' style="display:none;margin-left:'+lOffSet+'px;'if (rOffSet!='') toWrite+='margin-top:'+rOffSet+'px;'if (divWidth!='') toWrite+='width:'+divWidth+'px;'toWrite+='" class="printPreviewDiv '+divName+imgID+'"'+mo+'>'toWrite+='<'+divStyle+''if (divWidth!='') toWrite+=' style="width:'+divWidth+'px;"'toWrite+=''+moPC+'><a href="/printroom/print.asp?galleryID='+bookID+'&imageID='+imgID+'">'toWrite+='<img style="" src="'+imageserver+'/icons/photo.png" border="0" class="printPhotoIcon">'toWrite+='</a></'+divStyle+'>'toWrite+='<'+divStyle+' class="small pcOrderDiv" 'if (divWidth!='') toWrite+='style="width:'+divWidth+'px;"'toWrite+=''toWrite+=''+moPC+'>'if (detailedWrite==""){toWrite+='This image is available in our 'toWrite+='<strong>Print&nbsp;Room</strong>, as a bespoke 'toWrite+='<a href="/printroom/prints/print.asp?imageID='+imgID+'&galleryID='+bookID+'">print</a>'toWrite+=' or 'toWrite+='<a href="/printroom/cards/print.asp?imageID='+imgID+'&galleryID='+bookID+'">card</a></'+divStyle+'>'}else{toWrite+='<a href="'+detailedWrite+'print.asp?imageID='+imgID+'&galleryID='+bookID+'">jump to this image</'+divStyle+'>'}toWrite+='</'+divStyle+'>'document.write(toWrite)}function colorRows(whichTable){counter=0if (!whichTable) {whichTable="mainTable"} else if (whichTable=="") {whichTable="mainTable"}if ((1==0)||(!document.getElementsByTagName)) return;var mytable;mytable=getElementsByClass("sortingTable");for (var p=0;p<mytable.length;p++){var myTBODY=mytable[p].getElementsByTagName('tbody');for (var t=0;t<myTBODY.length;t++){var myTR=myTBODY[t].getElementsByTagName('tr');for (var i=0;i<myTR.length;i++){if ((i%2)){if (!myTR[i].className||myTR[i].className==""){myTR[i].className='alt';}else{myTR[i].className+=' alt'}counter++}}}}}function colorSortingTable(){colorRows();}addLoadEvent(colorSortingTable)var suspendedPage=false;var timerRunning=false;var secs;var timerID=null;var delay=1000;var hider=null;function startWaiting(){InitializeTimer();showHideTR ('prepageTable','show');hider=setTimeout ("reHidePage(false)",750);}function stopWaiting(){if(hider) clearTimeout(hider);reHidePage(true);unHidePage;}function unHidePage(){suspendedPage=unSuspendTag ("table","","") ;showHideTR ('prepageTable','hide');}function reHidePage(showPage){if(!showPage) showPage=false;if (suspendedPage==true||showPage==1){if(hider) clearTimeout(hider);suspendedPage=unSuspendTag ("table","","") ;showHideTR ('prepageTable','hide');}else{suspendedPage=suspendTag ("table","","prepageTable");showHideTR ('prepageTable','show');}InitializeTimer();}function InitializeTimer(){secs=0;stopTheClock();startTheClock();document.UpdateForm.seconds.value=0 ;}function stopTheClock(){if(timerRunning)clearTimeout(timerID);timerRunning=false;}function startTheClock(){secs=secs+1;timerRunning=true;timerID=self.setTimeout("startTheClock()", delay);document.UpdateForm.seconds.value=secs;}function writeFloater(divID,content){tmpTXT=writeFloaterStart(divID);tmpTXT+=content;tmpTXT+=writeFloaterEnd(divID);return tmpTXT;}function writeFloaterStart(divID){floatWrite='<div class="floatDiv" style="display:none;" id="'+divID+'">\n'floatWrite+='<table width="450" border="0" cellpadding="0" cellspacing="0" class="floatBoxOuter">';floatWrite+='<tr>\n<td><img src="'+imageserver+'/r/spacer.gif" width="10" height="10" class="floatTL"></td>';floatWrite+='<td class="topTD">'+writeSpacer(10,10)+'</td>';floatWrite+='<td><img src="'+imageserver+'/r/spacer.gif" width="10" height="10" class="floatTR"></td>\n</tr>';floatWrite+='<tr>\n<td class="leftTD">'+writeSpacer(10,10)+'</td>';floatWrite+='<td bgcolor="white"><table border="0" cellpadding="30" cellspacing="0" class="floatBoxInner">\n<tr>';floatWrite+='<td><div style="float:right;margin:10px;"><a href="javascript:;" ';FFN="startNewFader('"+divID+"','hide','','',10,4); "floatWrite+='onClick="'+FFN+'return false;" alt="Hide this"><img src="'+imageserver+'/r/spacer.gif" width=16 height=16 border="0" class="floatClose"></a></div>';return floatWrite;}function writeFloaterEnd(){floatWrite='</td>\n</tr>\n</table></td>';floatWrite+='<td class="rightTD">'+writeSpacer(10,10)+'</td>\n</tr>\n<tr>';floatWrite+='<td><img src="'+imageserver+'/r/spacer.gif" width="10" height="10" class="floatBL"></td>';floatWrite+='<td class="bottomTD">'+writeSpacer(10,10)+'</td>';floatWrite+='<td><img src="'+imageserver+'/r/spacer.gif" width="10" height="10" class="floatBR"></td>';floatWrite+='</tr>\n</table>\n</div>';return floatWrite;}var newFadeTimer=null;newFadeChange=15; defaultfadeChange=15;newFadeTime=5; defaultfadeTime=5;function startNewFader(inDiv,showHide,finalDisplay,finalPosition,inChange,inTime){if (!inChange) {newFadeChange=defaultfadeChange} else {newFadeChange=inChange;}if (!inTime) {newFadeTime=defaultfadeTime} else {newFadeTime=inTime;}if (!finalDisplay) {finalDisplay='block';}if (!finalPosition) {finalPosition='';}y=MM_findObj(inDiv);if (y!=null) {maxOpac=.99;currentOpac=1if (showHide=="show"){y.style.visibility="visible";}if (y.style.opacity!=''&&typeof(y.style.opacity)!='undefined'){currentOpac=y.style.opacity;}else if (showHide=="show"||showHide=="resetShow"){currentOpac=0;}else if (showHide=="resetHide"){currentOpac=1;}else{currentOpac=1;}y.style.opacity=currentOpac;y.style.display=finalDisplay;y.style.position=finalPosition;if (showHide=="hide"||showHide=="resetHide"){newFadeChange=newFadeChange*-1}doFade(currentOpac,newFadeChange,newFadeTime,inDiv,finalPosition);}else{}}function doFade(inOpac,inChange,inTime,divName,inPosition){inOpac=parseFloat(inOpac);inChange=parseInt(inChange);thisDiv=MM_findObj(divName);inOpac+=parseFloat(inChange/255);if (inOpac< maxOpac&&inOpac>0){if (inOpac>0){ieo=(inOpac*100);thisDiv.style.opacity=inOpac;thisDiv.style.filter="Alpha(opacity="+ieo+")";}else{thisDiv.style.opacity=0;thisDiv.style.filter="Alpha(opacity=0)";thisDiv.style.visibility="hidden";thisDiv.style.display="none";}newFadeTimer=setTimeout ("doFade("+inOpac+","+inChange+","+inTime+",'"+divName+"','"+inPosition+"')",inTime);}else{if (inOpac<0){thisDiv.style.opacity=0;thisDiv.style.filter="Alpha(opacity=0)";thisDiv.style.visibility="hidden";thisDiv.style.display="none";}else{thisDiv.style.opacity=1;thisDiv.style.filter="Alpha(opacity=100)";thisDiv.style.visibility="visible";}}}function cancelDoubleClicks (){var anchors, l;anchors=document.getElementsByTagName('a');for(l=0; l< anchors.length; l++){anchors[l].ondblclick=function(){return false;};}}addLoadEvent (cancelDoubleClicks);function goDept (where){document.location="/departments/index.asp?dept="+where; return false;}var p7AB=false;var p7ABi=false;function P7_setAB(){if(!document.getElementById){return;}var h,tA=navigator.userAgent.toLowerCase();if(window.opera){if(tA.indexOf("opera 5")>-1||tA.indexOf("opera 6")>-1){return;}}h=String.fromCharCode(60,115,116,121,108,101,32,116,121,112,101,61,34,116,101,120,116,47,99,115,115,34,62,46,112,55,65,66,99,111,110,116,101,110,116,123,100,105,115,112,108,97,121,58,110,111,110,101,59,125,60,47,115,116,121,108,101,62);h+='\n'+String.fromCharCode(60,33,45,45,91,105,102,32,108,116,101,32,73,69,32,55,93,62,60,115,116,121,108,101,62,46,112,55,65,66,44,46,112,55,65,66,32,100,105,118,123,122,111,111,109,58,49,48,48,37,59,125,60,47,115,116,121,108,101,62,60,33,91,101,110,100,105,102,93,45,45,62);h+='\n'+String.fromCharCode(60,33,45,45,91,105,102,32,108,116,101,32,73,69,32,54,93,62,60,115,116,121,108,101,62,46,112,55,65,66,44,46,112,55,65,66,99,111,110,116,101,110,116,44,46,112,55,65,66,116,114,105,103,32,97,123,104,101,105,103,104,116,58,49,37,59,125,60,47,115,116,121,108,101,62,60,33,91,101,110,100,105,102,93,45,45,62);document.write(h);}P7_setAB();function P7_opAB(){var x,c,tC,ab,tB;if(document.getElementById){ab='p7ABW'+arguments[0];tB=document.getElementById(ab);tB.p7Aba=arguments;x=arguments[3];if(x>0&&x<11){c='p7ABc'+arguments[0]+'_'+x;tC=document.getElementById(c);if(tC){tC.style.display='block';}}if(!p7ABi){p7ABi=true;if(window.addEventListener){window.addEventListener("load",P7_initAB,false);}else if(document.addEventListener){document.addEventListener("load",P7_initAB,false);}else if(window.attachEvent){window.attachEvent("onload",P7_initAB);}else if(typeof window.onload=='function'){var p7loadit=onload;window.onload=function(){p7loadit();P7_initAB();};}else{window.onload=P7_initAB;}}}}function P7_initAB(){var i,j,ab,tB,tD,tA,op,ob,tg;if(!document.getElementById){return;}for(i=10;i>0;i--){ab='p7ABW'+i;tB=document.getElementById(ab);if(tB){tA=tB.getElementsByTagName("A");tg='p7ABt'+i;for(j=0;j<tA.length;j++){if(tA[j].id&&tA[j].id.indexOf(tg)==0){tA[j].onclick=function(){return P7_ABtrig(this);};tA[j].p7ABstate=0;tA[j].p7ABpr=ab;}}ob=i+'_'+tB.p7Aba[3];P7_ABopen(ob);}}p7AB=true;P7_ABurl();}function P7_ABopen(s){var a,g,d='p7ABt'+s;a=document.getElementById(d);g=s.split("_");if(g&&g.length>1&&g[1]==99){a=P7_randAB(g[0]);}if(g&&g.length>1&&g[1]=='a'){P7_ABall(s);}else{if(a&&a.p7ABpr){if(a.p7ABstate==0){P7_ABtrig(a);}}}}function P7_ABclose(s){var a,d='p7ABt'+s;a=document.getElementById(d);if(a&&a.p7ABpr){if(a.p7ABstate==1){P7_ABtrig(a);}}}function P7_ABclick(s){var a,d='p7ABt'+s;a=document.getElementById(d);if(a&&a.p7ABpr){P7_ABtrig(a);}}function P7_randAB(r){var i,k,j=0,d,dd,tA,a,rD=new Array();dd='p7ABW'+r;d=document.getElementById(dd);if(d){tA=d.getElementsByTagName("A");for(i=0;i<tA.length;i++){if(tA[i].p7ABpr&&tA[i].p7ABpr==dd){rD[j]=tA[i].id;j++;}}if(j>0){k=Math.floor(Math.random()*j);a=document.getElementById(rD[k]);}}return a;}function P7_ABall(s){var i,m,d,dd,st,et,tA,g=s.split("_");if(g&&g.length==2){st=parseInt(g[0]);if(st){et=st+1;}else{st=1;et=11;}m=p7AB;p7AB=false;for(i=st;i<et;i++){dd='p7ABW'+i;d=document.getElementById(dd);if(d){tA=d.getElementsByTagName("A");for(j=0;j<tA.length;j++){if(tA[j].p7ABpr&&tA[j].p7ABpr==dd){if(g[1]=='a'&&tA[j].p7ABstate==0){P7_ABtrig(tA[j]);}else if(g[1]=='c'&&tA[j].p7ABstate==1){P7_ABtrig(tA[j]);}}}}}p7AB=m;}}function P7_ABurl(){var i,h,s,x,d='pab';if(document.getElementById){h=document.location.search;if(h){h=h.replace('?','');s=h.split(/[=&]/g);if(s&&s.length){for(i=0;i<s.length;i+=2){if(s[i]==d){x=s[i+1];if(x){P7_ABopen(x);}}}}}h=document.location.hash;if(h){x=h.substring(1,h.length);if(x&&x.indexOf("pab")==0){P7_ABopen(x.substring(3));}}}}function P7_ABtrig(a){var i,j=null,op,pD,ad,aT,m=true,cp='p7ABc'+a.p7ABpr.substring(a.p7ABpr.length-1);var iD=a.id.replace('t','c'),tD=document.getElementById(iD);if(tD){m=false;pD=document.getElementById(a.p7ABpr);op=pD.p7Aba;if(op[4]==1&&op[1]==1&&a.p7ABstate==1){return m;}tD=pD.getElementsByTagName("DIV");for(i=0;i<tD.length;i++){if(tD[i].id&&tD[i].id.indexOf(cp)>-1){if(tD[i].id==iD){j=i;if(a.className=="p7ABtrig_down"){a.p7ABstate=0;a.className='';P7_ABhide(tD[j],op);}else{a.p7ABstate=1;a.className="p7ABtrig_down";P7_ABshow(tD[j],op);}}else{if(op[1]==1){ad=tD[i].id.replace('c','t');aT=document.getElementById(ad);aT.className='';aT.p7ABstate=0;P7_ABhide(tD[i],op);}}}}}P7_checkEQH();return m;}function P7_checkEQH(){if(typeof(P7_colH2)=='function'){P7_colH2();}if(typeof(P7_colH)=='function'){P7_colH();}}function P7_ABshow(d,op){var h,wd,wP,isIE5=(navigator.appVersion.indexOf("MSIE 5")>-1);if(p7AB&&op[2]==3){d.style.display='block';P7_ABfadeIn(d.id,0);}else if((p7AB&&op[2]==1||p7AB&&op[2]==2)&&!isIE5){wd=d.id.replace("c","w");wP=document.getElementById(wd);if(P7_hasOverflow(d)||P7_hasOverflow(wP)){d.style.display='block';return;}wP.style.overflow="hidden";wP.style.height="1px";d.style.display='block';h=d.offsetHeight;P7_ABglide(wd,1,h,op[2]);}else{d.style.display='block';}}function P7_ABhide(d,op){var h,wd,wP,isIE5=(navigator.appVersion.indexOf("MSIE 5")>-1);if((p7AB&&op[2]==1||p7AB&&op[2]==2)&&!isIE5){wd=d.id.replace("c","w");wP=document.getElementById(wd);if(d.style.display!="none"){if(P7_hasOverflow(d)||P7_hasOverflow(wP)){d.style.display='none';return;}h=wP.offsetHeight;wP.style.overflow="hidden";P7_ABglide(wd,h,0,op[2]);}}else{d.style.display='none';}}function P7_hasOverflow(ob){var s,m;s=ob.style.overflow;if(!s){if(ob.currentStyle){s=ob.currentStyle.overflow;}else if(document.defaultView.getComputedStyle(ob,"")){s=document.defaultView.getComputedStyle(ob,"").getPropertyValue("overflow");}}m=(s&&s=='auto')?true:false;return m;}function P7_ABfadeIn(id,op){var d=document.getElementById(id);op+=.05;op=(op>=1)?1:op;if((navigator.appVersion.indexOf("MSIE")>-1)){d.style.filter='alpha(opacity='+op*100+')';}else{d.style.opacity=op;}if(op<1){setTimeout("P7_ABfadeIn('"+id+"',"+op+")",40);}}function P7_ABglide(dd,ch,th,p){var w,m,d,wd,wC,tt,dy=10,inc=10,pc=.15;d=document.getElementById(dd);m=(ch<=th)?0:1;if(p==1){tt=Math.abs(parseInt(Math.abs(th)-Math.abs(ch)));inc=(tt*pc<1)?1:tt*pc;}inc=(m==1)?inc*-1:inc;d.style.height=ch+"px";if(ch==th){if(th==0){wd=d.id.replace("w","c");wC=document.getElementById(wd);wC.style.display="none";d.style.height="auto";}else{d.style.height="auto";}P7_checkEQH();}else{ch+=inc;if(m==0){ch=(ch>=th)?th:ch;}else{ch=(ch<=th)?th:ch;}if(d.p7abG){clearTimeout(d.p7abG);}d.p7abG=setTimeout("P7_ABglide('"+dd+"',"+ch+","+th+","+p+")",dy);}}theNext=thePrevious="";var textFocus=0;var selectedTB='';var doHandle=true;var testing=0 ;var mKey;var sKey;var bookmark="";function getKeyPress(e){if (!e) {e=event; e.which=e.keyCode;}mKey=getModKey(e);sKey=getShiftKey(e);if (document.layers){key=e.which;}else if (document.all){key=e.keyCode;}else{key=e.which;}return key;}function getModKey(e){if (!e) {e=event; e.which=e.keyCode;}tmpBLN=false;try {tmpBLN=e.ctrlKey||e.altKey||e.metaKey ;}catch(e){tmpBLN=false;}return tmpBLN;}function getShiftKey(e){if (!e) {e=event; e.which=e.keyCode;}tmpBLN=false;try {tmpBLN=e.shiftKey ;}catch(e){tmpBLN=false;}return tmpBLN;}function altKey(e){if (!e) {e=event; e.which=e.keyCode;}tmpBLN=false;if(getModKey(e)==true||getShiftKey(e)==true) {tmpBLN=true;}return tmpBLN;}function handler(e) {if (ReadJSCookie("keyboard") !="false"){key=getKeyPress(e)mKey=getModKey(e)sKey=getShiftKey(e)if (key==50&&sKey==true&&mKey==true) {showAllCookies(0); return false;}if (key==53&&sKey==true&&mKey==true) {showAllCookies(1); return false;}if (key==65&&sKey==true&&mKey==true) {aFunction();}if (key==85&&sKey==true&&mKey==true) {uFunction();}if ((key==9)&&(mKey !=true) ){if (tabFunction ()==true) return false;}else if ((key==13)&&(mKey !=false) ){if (returnFunction ()==true) return false;}else if ((doHandle==true)&&(textFocus==0)&&(mKey !=true)){if ((key>=48)&&(key<=57)&&(mKey==false) ){return numFunction(key-48);}else if ((key>=96)&&(key<=105)&&(mKey==false) ){return numFunction(key-96);}else{if ((key==68)&&(bookmark !='')) {dFunction() ;}if ((key==66)&&(bookmark !='')) {bFunction();}if ((key==39)||(key==88)) {rightFunction();}if ((key==37)||(key==90)){leftFunction() ;}if (key==27) {escFunction() ;}if (key==32) {SSFunction();}if (key==70) {fFunction();}if (key==73) {iFunction();}}}}}function cancelHandler() {doHandle=false;}function restartHandler() {doHandle=true;}function tabFunction() {}function returnFunction() {}function aFunction() {}function bFunction() {}function dFunction() {}function uFunction() {}function rightFunction() {}function leftFunction() {}function fFunction() {}function iFunction() {}function SSFunction() {}function escFunction() {}function numFunction() {}if(document.all) {document.onkeydown=handler;} else {window.onkeydown=handler;}(function() {fdTableSort={regExp_Currency: /^[å£$‰âÂå´å?]/,regExp_Number: /^(\-)?[0-9]+(\.[0-9]*)?$/,pos: -1,uniqueHash: 1,thNode: null,tableId: null,tableCache: {},tmpCache: {},sortActiveClass: "sort-active",/*@cc_on/*@if (@_win32)colspan: "colSpan",rowspan: "rowSpan",@else @*/colspan: "colspan",rowspan: "rowspan",/*@end@*/addEvent: function(obj, type, fn, tmp) {tmp||(tmp=true);if(obj.attachEvent ) {obj["e"+type+fn]=fn;obj[type+fn]=function(){obj["e"+type+fn](window.event );};obj.attachEvent("on"+type, obj[type+fn] );} else {obj.addEventListener(type, fn, true );};},removeEvent: function(obj, type, fn, tmp) {tmp||(tmp=true);try {if(obj.detachEvent ) {obj.detachEvent("on"+type, obj[type+fn] );obj[type+fn]=null;} else {obj.removeEventListener(type, fn, true );};} catch(err) {};},stopEvent: function(e) {e=e||window.event;if(e.stopPropagation) {e.stopPropagation();e.preventDefault();};/*@cc_on@*//*@if(@_win32)e.cancelBubble=true;e.returnValue=false;/*@end@*/return false;},parseClassName: function(head, tbl) {var colMatch=tbl.className.match(new RegExp(head+"((-[\\d]+([r]){0,1})+)"));return colMatch&&colMatch.length ? colMatch[0].replace(head, "").split("-") : [];},disableSelection: function(element) {element.onselectstart=function() {return false;};element.unselectable="on";element.style.MozUserSelect="none";},removeTableCache: function(tableId) {if(!(tableId in fdTableSort.tableCache)) return;fdTableSort.tableCache[tableId]=null;delete fdTableSort.tableCache[tableId];var tbl=document.getElementById(tableId);if(!tbl) return;var ths=tbl.getElementsByTagName("th");var a;for(var i=0, th; th=ths[i]; i++) {a=th.getElementsByTagName("a");if(a.length) a[0].onkeydown=a[0].onclick=null;th.onclick=th.onselectstart=th=a=null;};},removeTmpCache: function(tableId) {if(!(tableId in fdTableSort.tmpCache)) return;var headers=fdTableSort.tmpCache[tableId].headers;var a;for(var i=0, row; row=headers[i]; i++) {for(var j=0, th; th=row[j]; j++) {a=th.getElementsByTagName("a");if(a.length) a[0].onkeydown=a[0].onclick=null;th.onclick=th.onselectstart=th=a=null;};};fdTableSort.tmpCache[tableId]=null;delete fdTableSort.tmpCache[tableId];},initEvt: function(e) {fdTableSort.init(false);},init: function(tableId) {if (!document.getElementsByTagName||!document.createElement||!document.getElementById) return;var tables=tableId&&document.getElementById(tableId) ? [document.getElementById(tableId)] : document.getElementsByTagName("table");var c, ii, len, colMatch, showOnly, match, showArrow, columnNumSortObj, obj, workArr, headers, thtext, aclone, multi, colCnt, cel, allRowArr, rowArr, sortableTable, celCount, colspan, rowspan, rowLength;var a=document.createElement("a");a.href="#";a.className="fdTableSortTrigger";var span=document.createElement("span");for(var k=0, tbl; tbl=tables[k]; k++) {if(tbl.id) {fdTableSort.removeTableCache(tbl.id);fdTableSort.removeTmpCache(tbl.id);};allRowArr=tbl.getElementsByTagName('thead').length ? tbl.getElementsByTagName('thead')[0].getElementsByTagName('tr') : tbl.getElementsByTagName('tr');rowArr=[];sortableTable=false;for(var i=0, tr; tr=allRowArr[i]; i++) {if(tr.getElementsByTagName('td').length||!tr.getElementsByTagName('th').length) {continue;};rowArr[rowArr.length]=tr.getElementsByTagName('th');for(var j=0, th; th=rowArr[rowArr.length - 1][j]; j++) {if(th.className.search(/sortable/) !=-1) {sortableTable=true;};};};if(!sortableTable) continue;if(!tbl.id) {tbl.id="fd-table-"+fdTableSort.uniqueHash++;};showArrow=tbl.className.search("no-arrow") !=-1;showOnly=tbl.className.search("sortable-onload-show") !=-1;columnNumSortObj={};colMatch=fdTableSort.parseClassName(showOnly ? "sortable-onload-show" : "sortable-onload", tbl);for(match=1; match< colMatch.length; match++) {columnNumSortObj[parseInt(colMatch[match], 10)]={"reverse":colMatch[match].search("r") !=-1};};rowLength=rowArr[0].length;for(c=0;c< rowArr[0].length;c++){if(rowArr[0][c].getAttribute(fdTableSort.colspan)&&rowArr[0][c].getAttribute(fdTableSort.colspan)>1){rowLength=rowLength+(rowArr[0][c].getAttribute(fdTableSort.colspan) - 1);};};workArr=new Array(rowArr.length);for(c=rowArr.length;c--;){workArr[c]=new Array(rowLength);};for(c=0;c< workArr.length;c++){celCount=0;for(i=0;i< rowLength;i++){if(!workArr[c][i]){cel=rowArr[c][celCount];colspan=(cel.getAttribute(fdTableSort.colspan)>1) ? cel.getAttribute(fdTableSort.colspan):1;rowspan=(cel.getAttribute(fdTableSort.rowspan)>1) ? cel.getAttribute(fdTableSort.rowspan):1;for(var t=0;((t< colspan)&&((i+t)< rowLength));t++){for(var n=0;((n< rowspan)&&((c+n)< workArr.length));n++) {workArr[(c+n)][(i+t)]=cel;};};if(++celCount==rowArr[c].length) break;};};};for(c=0;c< workArr.length;c++) {for(i=0;i< workArr[c].length;i++){if(workArr[c][i].className.search("fd-column-")==-1&&workArr[c][i].className.search("sortable") !=-1) workArr[c][i].className=workArr[c][i].className+" fd-column-"+i;if(workArr[c][i].className.match('sortable')) {workArr[c][i].className=workArr[c][i].className.replace(/forwardSort|reverseSort/, "");if(i in columnNumSortObj) {columnNumSortObj[i]["thNode"]=workArr[c][i];columnNumSortObj["active"]=true;};thtext=fdTableSort.getInnerText(workArr[c][i], true);for(var cn=workArr[c][i].childNodes.length; cn--;) {if(workArr[c][i].childNodes[cn].nodeType==1&&(workArr[c][i].childNodes[cn].className=="fdFilterTrigger"||/img/i.test(workArr[c][i].childNodes[cn].nodeName))) {continue;};if(workArr[c][i].childNodes[cn].nodeType==1&&/^a$/i.test(workArr[c][i].childNodes[cn].nodeName)) {workArr[c][i].childNodes[cn].onclick=workArr[c][i].childNodes[cn].onkeydown=null;};workArr[c][i].removeChild(workArr[c][i].childNodes[cn]);};aclone=a.cloneNode(true);aclone.innerHTML=thtext;aclone.title="Sort on \u201c"+thtext.replace('<br />', '')+"\u201d";aclone.onclick=aclone.onkeydown=workArr[c][i].onclick=fdTableSort.initWrapper;workArr[c][i].appendChild(aclone);if(showArrow) workArr[c][i].appendChild(span.cloneNode(false));workArr[c][i].className=workArr[c][i].className.replace(/fd-identical|fd-not-identical/, "");fdTableSort.disableSelection(workArr[c][i]);aclone=null;};};};fdTableSort.tmpCache[tbl.id]={cols:rowLength, headers:workArr};workArr=null;multi=0;if("active" in columnNumSortObj) {fdTableSort.tableId=tbl.id;fdTableSort.prepareTableData(document.getElementById(fdTableSort.tableId));delete columnNumSortObj["active"];for(col in columnNumSortObj) {obj=columnNumSortObj[col];if(!("thNode" in obj)) {continue;};fdTableSort.multi=true;len=obj.reverse ? 2 : 1;for(ii=0; ii< len; ii++) {fdTableSort.thNode=obj.thNode;if(!showOnly) {fdTableSort.initSort(false, true);} else {fdTableSort.addThNode();};};if(showOnly) {fdTableSort.removeClass(obj.thNode, "(forwardSort|reverseSort)");fdTableSort.addClass(obj.thNode, obj.reverse ? "reverseSort" : "forwardSort");if(showArrow) {span=fdTableSort.thNode.getElementsByTagName('span')[0];if(span.firstChild) {span.removeChild(span.firstChild);};span.appendChild(document.createTextNode(len==1 ? " \u2193" : " \u2191"));};};};if(showOnly&&(fdTableSort.tableCache[tbl.id].colStyle||fdTableSort.tableCache[tbl.id].rowStyle)) {fdTableSort.redraw(tbl.id, false);};} else if(tbl.className.search(/onload-zebra/) !=-1) {fdTableSort.tableId=tbl.id;fdTableSort.prepareTableData(tbl);if(fdTableSort.tableCache[tbl.id].rowStyle) {fdTableSort.redraw(tbl.id, false);};};};fdTableSort.thNode=aclone=a=span=columnNumSortObj=thNode=tbl=allRowArr=rowArr=null;},initWrapper: function(e) {e=e||window.event;var kc=e.type=="keydown" ? e.keyCode !=null ? e.keyCode : e.charCode : -1;if(fdTableSort.thNode==null&&(e.type=="click"||kc==13)) {var targ=this;while(targ.tagName.toLowerCase() !="th") {targ=targ.parentNode;};fdTableSort.thNode=targ;while(targ.tagName.toLowerCase() !="table") {targ=targ.parentNode;};fdTableSort.tableId=targ.id;fdTableSort.multi=e.shiftKey;fdTableSort.addSortActiveClass();setTimeout(fdTableSort.initSort,5,false);return fdTableSort.stopEvent(e);};return kc !=-1 ? true : fdTableSort.stopEvent(e);},jsWrapper: function(tableid, colNums) {if(!(tableid in fdTableSort.tmpCache)) {return false;};if(!(tableid in fdTableSort.tableCache)) {fdTableSort.prepareTableData(document.getElementById(tableid));};if(!(colNums instanceof Array)) {colNums=[colNums];};fdTableSort.tableId=tableid;var len=colNums.length, colNum;if(fdTableSort.tableCache[tableid].thList.length==colNums.length) {var identical=true;var th;for(var i=0; i< len; i++) {colNum=colNums[i];th=fdTableSort.tmpCache[tableid].headers[0][colNum];if(th !=fdTableSort.tableCache[tableid].thList[i]) {identical=false;break;};};if(identical) {fdTableSort.thNode=th;fdTableSort.initSort(true);return;};};fdTableSort.addSortActiveClass();for(var i=0; i< len; i++) {fdTableSort.multi=i;colNum=colNums[i];fdTableSort.thNode=fdTableSort.tmpCache[tableid].headers[0][colNum];fdTableSort.initSort(true);};},addSortActiveClass: function() {if(fdTableSort.thNode==null) {return;};fdTableSort.addClass(fdTableSort.thNode, fdTableSort.sortActiveClass);fdTableSort.addClass(document.getElementsByTagName('body')[0], fdTableSort.sortActiveClass);},removeSortActiveClass: function() {if(fdTableSort.thNode==null) return;fdTableSort.removeClass(fdTableSort.thNode, fdTableSort.sortActiveClass);fdTableSort.removeClass(document.getElementsByTagName('body')[0], fdTableSort.sortActiveClass);},doCallback: function(init) {if(!fdTableSort.tableId||!(fdTableSort.tableId in fdTableSort.tableCache)) {return;};fdTableSort.callback(fdTableSort.tableId, init ? fdTableSort.tableCache[fdTableSort.tableId].initiatedCallback : fdTableSort.tableCache[fdTableSort.tableId].completeCallback);},addClass: function(e,c) {if(new RegExp("(^|\\s)"+c+"(\\s|$)").test(e.className)) {return;};e.className+=(e.className ? " " : "" )+c;},/*@cc_on/*@if (@_win32)removeClass: function(e,c) {e.className=!c ? "" : e.className.replace(new RegExp("(^|\\s)"+c+"(\\s|$)"), " ").replace(/^\s*((?:[\S\s]*\S)?)\s*$/, '$1');},@else @*/removeClass: function(e,c) {e.className=!c ? "" : e.className.replace(new RegExp("(^|\\s)"+c+"(\\s|$)"), " ").replace(/^\s\s*/, '').replace(/\s\s*$/, '');},/*@end@*/callback: function(tblId, cb) {var func, parts;try {if(cb.indexOf(".") !=-1) {parts=cb.split('.');obj=window;for (var x=0, part; part=obj[parts[x]]; x++) {if(part instanceof Function) {(function() {var method=part;func=function (data) {method.apply(obj, [data])};})();} else {obj=part;};};} else if(cb+tblId in window) {func=window[cb+tblId];} else if(cb in window) {func=window[cb];} else {func=null;};} catch(err) {};if(!(func instanceof Function)) return;func(tblId, fdTableSort.tableCache[tblId].thList);},prepareTableData: function(table) {var data=[];var start=table.getElementsByTagName('tbody');start=start.length ? start[0] : table;var trs=start.rows;var ths=table.getElementsByTagName('th');var numberOfRows=trs.length;var numberOfCols=fdTableSort.tmpCache[table.id].cols;var data=[];var identical=new Array(numberOfCols);var identVal=new Array(numberOfCols);for(var tmp=0; tmp< numberOfCols; tmp++) identical[tmp]=true;var tr, td, th, txt, tds, col, row;var re=new RegExp(/fd-column-([0-9]+)/);var rowCnt=0;var sortableColumnNumbers=[];for(var tmp=0, th; th=ths[tmp]; tmp++) {if(th.className.search(re)==-1) continue;sortableColumnNumbers[sortableColumnNumbers.length]=th;};for(row=0; row< numberOfRows; row++) {tr=trs[row];if(tr.parentNode !=start||tr.getElementsByTagName("th").length||(tr.parentNode&&tr.parentNode.tagName.toLowerCase().search(/thead|tfoot/) !=-1)) continue;data[rowCnt]=[];tds=tr.cells;for(var tmp=0, th; th=sortableColumnNumbers[tmp]; tmp++) {col=th.className.match(re)[1];td=tds[col];txt=fdTableSort.getInnerText(td)+" ";txt=txt.replace(/^\s+/,'').replace(/\s+$/,'');if(th.className.search(/sortable-date/) !=-1) {txt=fdTableSort.dateFormat(txt, th.className.search(/sortable-date-dmy/) !=-1);} else if(th.className.search(/sortable-numeric|sortable-currency/) !=-1) {txt=parseFloat(txt.replace(/[^0-9\.\-]/g,''));if(isNaN(txt)) txt="";} else if(th.className.search(/sortable-text/) !=-1) {txt=txt.toLowerCase();} else if (th.className.search(/sortable-keep/) !=-1) {txt=rowCnt;} else if(th.className.search(/sortable-([a-zA-Z\_]+)/) !=-1) {if((th.className.match(/sortable-([a-zA-Z\_]+)/)[1]+"PrepareData") in window) {txt=window[th.className.match(/sortable-([a-zA-Z\_]+)/)[1]+"PrepareData"](td, txt);};} else if(txt !="") {fdTableSort.removeClass(th, "sortable");if(fdTableSort.dateFormat(txt) !=0) {fdTableSort.addClass(th, "sortable-date");txt=fdTableSort.dateFormat(txt);} else if(txt.search(fdTableSort.regExp_Number) !=-1||txt.search(fdTableSort.regExp_Currency) !=-1) {fdTableSort.addClass(th, "sortable-numeric");txt=parseFloat(txt.replace(/[^0-9\.\-]/g,''));if(isNaN(txt)) txt="";} else {fdTableSort.addClass(th, "sortable-text");txt=txt.toLowerCase();};};if(rowCnt>0&&identical[col]&&identVal[col] !=txt) {identical[col]=false;};identVal[col]=txt;data[rowCnt][col]=txt;};data[rowCnt][numberOfCols]=tr;rowCnt++;};var colStyle=table.className.search(/colstyle-([\S]+)/) !=-1 ? table.className.match(/colstyle-([\S]+)/)[1] : false;var rowStyle=table.className.search(/rowstyle-([\S]+)/) !=-1 ? table.className.match(/rowstyle-([\S]+)/)[1] : false;var iCBack=table.className.search(/sortinitiatedcallback-([\S-]+)/)==-1 ? "sortInitiatedCallback" : table.className.match(/sortinitiatedcallback-([\S]+)/)[1];var cCBack=table.className.search(/sortcompletecallback-([\S-]+)/)==-1 ? "sortCompleteCallback" : table.className.match(/sortcompletecallback-([\S]+)/)[1];iCBack=iCBack.replace("-", ".");cCBack=cCBack.replace("-", ".");fdTableSort.tableCache[table.id]={hook:start, initiatedCallback:iCBack, completeCallback:cCBack, thList:[], colOrder:{}, data:data, identical:identical, colStyle:colStyle, rowStyle:rowStyle, noArrow:table.className.search(/no-arrow/)==-1};sortableColumnNumbers=data=tr=td=th=trs=identical=identVal=null;},onUnload: function() {for(tbl in fdTableSort.tableCache) {fdTableSort.removeTableCache(tbl);};for(tbl in fdTableSort.tmpCache) {fdTableSort.removeTmpCache(tbl);};fdTableSort.removeEvent(window, "load", fdTableSort.initEvt);fdTableSort.removeEvent(window, "unload", fdTableSort.onUnload);fdTableSort.tmpCache=fdTableSort.tableCache=null;},addThNode: function() {var dataObj=fdTableSort.tableCache[fdTableSort.tableId];var pos=fdTableSort.thNode.className.match(/fd-column-([0-9]+)/)[1];var alt=false;if(!fdTableSort.multi) {if(dataObj.colStyle) {var len=dataObj.thList.length;for(var i=0; i< len; i++) {dataObj.colOrder[dataObj.thList[i].className.match(/fd-column-([0-9]+)/)[1]]=false;};};if(dataObj.thList.length&&dataObj.thList[0]==fdTableSort.thNode) alt=true;dataObj.thList=[];};var found=false;var l=dataObj.thList.length;for(var i=0, n; n=dataObj.thList[i]; i++) {if(n==fdTableSort.thNode) {found=true;break;};};if(!found) {dataObj.thList.push(fdTableSort.thNode);if(dataObj.colStyle) {dataObj.colOrder[pos]=true;};};var ths=document.getElementById(fdTableSort.tableId).getElementsByTagName("th");for(var i=0, th; th=ths[i]; i++) {found=false;for(var z=0, n; n=dataObj.thList[z]; z++) {if(n==th) {found=true;break;};};if(!found) {fdTableSort.removeClass(th, "(forwardSort|reverseSort)");if(!dataObj.noArrow) {span=th.getElementsByTagName('span');if(span.length) {span=span[0];while(span.firstChild) span.removeChild(span.firstChild);};};};};if(dataObj.thList.length>1) {classToAdd=fdTableSort.thNode.className.search(/forwardSort/) !=-1 ? "reverseSort" : "forwardSort";fdTableSort.removeClass(fdTableSort.thNode, "(forwardSort|reverseSort)");fdTableSort.addClass(fdTableSort.thNode, classToAdd);dataObj.pos=-1} else if(alt) {dataObj.pos=fdTableSort.thNode};},initSort: function(noCallback, ident) {var thNode=fdTableSort.thNode;var tableElem=document.getElementById(fdTableSort.tableId);if(!(fdTableSort.tableId in fdTableSort.tableCache)) {fdTableSort.prepareTableData(document.getElementById(fdTableSort.tableId));};fdTableSort.addThNode();if(!noCallback) {fdTableSort.doCallback(true);};fdTableSort.pos=thNode.className.match(/fd-column-([0-9]+)/)[1];var dataObj=fdTableSort.tableCache[tableElem.id];var lastPos=dataObj.pos&&dataObj.pos.className ? dataObj.pos.className.match(/fd-column-([0-9]+)/)[1] : -1;var len1=dataObj.data.length;var len2=dataObj.data.length>0 ? dataObj.data[0].length - 1 : 0;var identical=dataObj.identical[fdTableSort.pos];var classToAdd="forwardSort";if(dataObj.thList.length>1) {var js="var sortWrapper=function(a,b) {\n";var l=dataObj.thList.length;var cnt=0;var e,d,th,p,f;for(var i=0; i< l; i++) {th=dataObj.thList[i];p=th.className.match(/fd-column-([0-9]+)/)[1];if(dataObj.identical[p]) {continue;};cnt++;if(th.className.match(/sortable-(numeric|currency|date|keep)/)) {f="fdTableSort.sortNumeric";} else if(th.className.match('sortable-text')) {f="fdTableSort.sortText";} else if(th.className.search(/sortable-([a-zA-Z\_]+)/) !=-1&&th.className.match(/sortable-([a-zA-Z\_]+)/)[1] in window) {f="window['"+th.className.match(/sortable-([a-zA-Z\_]+)/)[1]+"']";} else f="fdTableSort.sortText";e="e"+i;d=th.className.search('forwardSort') !=-1 ? "a,b" : "b,a";js+="fdTableSort.pos="+p+";\n";js+="var "+e+"="+f+"("+d+");\n";js+="if("+e+") return "+e+";\n";js+="else {\n";};js+="return 0;\n";for(var i=0; i< cnt; i++) {js+="};\n";};if(cnt) js+="return 0;\n";js+="};\n";eval(js);dataObj.data.sort(sortWrapper);identical=false;} else if((lastPos==fdTableSort.pos&&!identical)||(thNode.className.search(/sortable-keep/) !=-1&&lastPos==-1)) {dataObj.data.reverse();classToAdd=thNode.className.search(/reverseSort/) !=-1 ? "forwardSort" : "reverseSort";if(thNode.className.search(/sortable-keep/) !=-1&&lastPos==-1) fdTableSort.tableCache[tableElem.id].pos=thNode;} else {fdTableSort.tableCache[tableElem.id].pos=thNode;classToAdd=thNode.className.search(/forwardSort/) !=-1 ? "reverseSort" : "forwardSort";if(!identical) {if(thNode.className.match(/sortable-(numeric|currency|date|keep)/)) {dataObj.data.sort(fdTableSort.sortNumeric);} else if(thNode.className.match('sortable-text')) {dataObj.data.sort(fdTableSort.sortText);} else if(thNode.className.search(/sortable-([a-zA-Z\_]+)/) !=-1&&thNode.className.match(/sortable-([a-zA-Z\_]+)/)[1] in window) {dataObj.data.sort(window[thNode.className.match(/sortable-([a-zA-Z\_]+)/)[1]]);};if(thNode.className.search(/(^|\s)favour-reverse($|\s)/) !=-1) {classToAdd=classToAdd=="forwardSort" ? "reverseSort" : "forwardSort";dataObj.data.reverse();};};};if(ident) {identical=false;};if(dataObj.thList.length==1) {fdTableSort.removeClass(thNode, "(forwardSort|reverseSort)");fdTableSort.addClass(thNode, classToAdd);};if(!dataObj.noArrow) {var span=fdTableSort.thNode.getElementsByTagName('span')[0];if(span.firstChild) span.removeChild(span.firstChild);span.appendChild(document.createTextNode(fdTableSort.thNode.className.search(/forwardSort/) !=-1 ? " \u2193" : " \u2191"));};if(!dataObj.rowStyle&&!dataObj.colStyle&&identical) {fdTableSort.removeSortActiveClass();if(!noCallback) {fdTableSort.doCallback(false);};fdTableSort.thNode=null;return;};if("tablePaginater" in window&&tablePaginater.tableIsPaginated(fdTableSort.tableId)) {tablePaginater.redraw(fdTableSort.tableId, identical);} else {fdTableSort.redraw(fdTableSort.tableId, identical);};fdTableSort.removeSortActiveClass();if(!noCallback) {fdTableSort.doCallback(false);};fdTableSort.thNode=null;},redraw: function(tableid, identical) {if(!tableid||!(tableid in fdTableSort.tableCache)) {return;};var dataObj=fdTableSort.tableCache[tableid];var data=dataObj.data;var len1=data.length;var len2=len1 ? data[0].length - 1 : 0;var hook=dataObj.hook;var colStyle=dataObj.colStyle;var rowStyle=dataObj.rowStyle;var colOrder=dataObj.colOrder;var highLight=0;var reg=/(^|\s)invisibleRow(\s|$)/;var tr, tds;for(var i=0; i< len1; i++) {tr=data[i][len2];if(colStyle) {tds=tr.cells;for(thPos in colOrder) {if(!colOrder[thPos]) fdTableSort.removeClass(tds[thPos], colStyle);else fdTableSort.addClass(tds[thPos], colStyle);};};if(!identical) {if(rowStyle&&tr.className.search(reg)==-1) {if(highLight++& 1) fdTableSort.addClass(tr, rowStyle);else fdTableSort.removeClass(tr, rowStyle);};hook.appendChild(tr);};};tr=tds=hook=null;},getInnerText: function(el, allowBrTags) {if (typeof el=="string"||typeof el=="undefined") return el;if(el.innerText) return el.innerText;var txt='', i;for(i=el.firstChild; i; i=i.nextSibling) {if(allowBrTags&&i.nodeName&&i.nodeName=="BR") txt+="<br />";else if(i.nodeType==3) txt+=i.nodeValue;else if(i.nodeType==1) txt+=fdTableSort.getInnerText(i);};return txt;},dateFormat: function(dateIn, favourDMY) {var dateTest=[{regExp:/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/, d:3, m:1, y:5},{regExp:/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/, d:1, m:3, y:5},{regExp:/^(\d\d\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/, d:5, m:3, y:1}];var start, cnt=0, numFormats=dateTest.length;while(cnt< numFormats) {start=(cnt+(favourDMY ? numFormats+1 : numFormats)) % numFormats;if(dateIn.match(dateTest[start].regExp)) {res=dateIn.match(dateTest[start].regExp);y=res[dateTest[start].y];m=res[dateTest[start].m];d=res[dateTest[start].d];if(m.length==1) m="0"+String(m);if(d.length==1) d="0"+String(d);if(y.length !=4) y=(parseInt(y)< 50) ? "20"+String(y) : "19"+String(y);return y+String(m)+d;};cnt++;};return 0;},sortNumeric:function(a,b) {var aa=a[fdTableSort.pos];var bb=b[fdTableSort.pos];if(aa==bb) return 0;if(aa===""&&!isNaN(bb)) return -1;if(bb===""&&!isNaN(aa)) return 1;return aa - bb;},sortText:function(a,b) {var aa=a[fdTableSort.pos];var bb=b[fdTableSort.pos];if(aa==bb) return 0;if(aa< bb) return -1;return 1;}};})();fdTableSort.addEvent(window, "load", fdTableSort.initEvt);fdTableSort.addEvent(window, "unload", fdTableSort.onUnload);function detectVersion(){version=parseInt(navigator.appVersion);return version;}function detectOS(){if(navigator.userAgent.indexOf('Win')==-1) {OS='Macintosh';} else {OS='Windows';}return OS ;}function detectBrowser(){if(navigator.appName.indexOf('Netscape')==-1) {browser='IE';} else {browser='Netscape';}return browser;}function maggsFullScreen(goWhere){var adjWidth=0 ;var adjHeight=0 ;if((detectOS()=='Macintosh')&&(detectBrowser()=='Netscape')){adjWidth=0;adjHeight=15;}if((detectOS()=='Macintosh')&&(detectBrowser()=='IE')){adjWidth=0;adjHeight=35;winOptions='fullscreen=yes';}if((detectOS()=='Windows')&&(detectBrowser()=='Netscape')){adjWidth=0;adjHeight=30;}if(detectVersion()< 4){self.location.href=goWhere;}else{var winWidth=screen.availWidth - adjWidth;var winHeight=screen.availHeight - adjHeight;var winSize='width='+winWidth+',height='+winHeight;//alert(winSize)var thewindow=window.open(goWhere+'&width='+winWidth+'&height='+winHeight, 'WindowName', winSize);if (thewindow){thewindow.focus();thewindow.moveTo(0,0);}else {alert('We tried to open a popup window, but it seems to have failed. Please check your browser settings and try again.');}}return false;}var AO="";