siteBase="eroticprints"
siteName="eroticprints.org"
jsFolder="js"
imageserver="/i"
sn=siteName
loginDir="/memberlogin"
userDir="/members"
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"}}
function makeNumeric(inInt,fallBack){x=inInt
if (x==""||x==null||(!isNumeric(x))){x=fallBack}
else{x=parseInt(inInt)}
return x}
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){tmpBLN=false;
thisSelectedValue=getSelectedValue(selectName);
try{for(index=0; index< selectName.length; index++){if (optionValue!=""||(optionValue==""&&optionText=="") ){if(selectName[index].value==optionValue){selectName.selectedIndex=index;
tmpBLN=true;}}
else if (optionText!=""){if(selectName[index].text==optionText){selectName.selectedIndex=index;
tmpBLN=true;}}
else{tmpBLN=true;}}}
catch(e) {alert('error is '+e)}
if (warnOnFail==1&&tmpBLN==false){alert('Failed to update checkbox. sorry.');}
else if (warnOnSuccess==1&&thisSelectedValue !=getSelectedValue(selectName)){alert('Updated Checkbox. New value is "'+getSelectedValue(selectName)+'": "'+getSelectedText(selectName)+'"');}}
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;
maxOpac=0.99;
showing=""
function showFade(x,what){if (MM_findObj (x)){showing=x
y=MM_findObj (x);
y.style.visibility="visible"; y.style.display="block";
try{thisOpac=(y.style.opacity)
if (thisOpac==""&&y.style.display!='none') {thisOpac=1}
o=thisOpac*255/255}
catch (e){o=0}
chO=(changeTimer/255);
showing=fadeReal(o,chO,1,x,'showing')}}
function hideFade(x,what){if (MM_findObj (x)){y=MM_findObj (x);
y.style.visibility="visible"; y.style.display="block";
try{thisOpac=(y.style.opacity)
if (thisOpac==""&&y.style.display!='none') {thisOpac=1}
o=thisOpac*255/255}
catch (e){o=0}
chO=(-changeTimer/255);
hiding=fadeReal(o,chO,0,x,'fading')}}
counter=0
function fadeReal(Ao,changeO,target0,Awhere,doFunction){Ao=(parseInt(Ao*100)/100)
changeO=(parseInt(changeO*1000)/1000)
counter++
Ao+=changeO
where=MM_findObj (Awhere)
if (changeO>0&&Ao< 1){doIt=true}
else if (changeO<0&&Ao>0){doIt=true}
else{doIt=false}
if (doIt==true ){ieo=(Ao*100);
where.style.opacity=Ao
where.style.filter="Alpha(opacity="+ieo+")";
doFunction=setTimeout (function() {fadeReal(Ao,changeO,target0,Awhere,doFunction)}, changeTimer);}
else{if (changeO<0){where.style.opacity=0; where.style.display='none'; where.style.visibility="hidden";}
else{where.style.opacity=1; where.style.display='block';}}}
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";}}
var TimeToFade=600.0;
function flipFade (inDiv,doWhat){if (doWhat=='show'){}}
function fade(eid,TimeToFade,displayType,forceFade,onFadeIn,onFadeOut){var element=document.getElementById(eid);
if(element==null)
return;
if (!TimeToFade) TimeToFade=600.0;
if (!displayType) displayType=""
if (!forceFade) forceFade=""
if(element.FadeState==null){if(element.style.display=='none'||element.style.visibility=='hidden'){element.FadeState=-2;}
else if(element.style.opacity==null
||element.style.opacity==''
||element.style.opacity=='1'
){element.FadeState=2;}
else{element.FadeState=-2;}
if (element.FadeState==-2){element.style.opacity=0;
element.style.filter="alpha(opacity=0)";}
else{element.style.opacity=1;
element.style.filter="alpha(opacity=100)";}}
if (forceFade!=''){logInfo('forceFade on '+eid)
before=('eid: '+eid+' '+forceFade+' '+element.FadeState)
if (forceFade=='show'){if (element.FadeState==1){element.FadeState=-1}
else if (element.FadeState==2){element.FadeState=0}
else if (element.FadeState==-1){element.FadeState=-1}
else if (element.FadeState==0&&element.style.opacity !=1){element.FadeState=-2}}
else{if (element.FadeState==-1){element.FadeState=1}
else if (element.FadeState==-2){element.FadeState=0}
else if (element.FadeState==1){element.FadeState=1}
else if (element.FadeState==0&&element.style.opacity==1){element.FadeState=2}}
logInfo ('Before:'+before+'<br>'+'eid: '+eid+' '+forceFade+' '+element.FadeState)}
if (element.FadeState==1||element.FadeState==-1){element.FadeState=element.FadeState==1 ? -1 : 1;
element.FadeTimeLeft=TimeToFade - element.FadeTimeLeft;}
else if (element.FadeState==2||element.FadeState==-2){element.FadeState=element.FadeState==2 ? -1 : 1;
element.FadeTimeLeft=TimeToFade;
if (displayType=='vis'||displayType=='' ){element.style.visibility=element.FadeState==2 ? 'hidden' : 'visible';}
if (displayType=='dis'||displayType=='' ){element.style.display=element.FadeState==2 ? 'none' : 'block';}
element.style.display="block"
element.style.visibility="visible"
setTimeout("animateFade("+new Date().getTime()+",'"+eid+"',"+TimeToFade+",'"+displayType+"','"+onFadeIn+"','"+onFadeOut+"')", 33);}  }
function animateFade(lastTick,eid,TimeToFade,displayType,onFadeIn,onFadeOut){ 
var curTick=new Date().getTime();
var elapsedTicks=curTick - lastTick;
var element=document.getElementById(eid);
 
if(element.FadeTimeLeft<=elapsedTicks){if (displayType=='vis'||displayType=='' ){element.style.visibility=element.FadeState==1 ? 'visible' : 'hidden';}
if (displayType=='dis'||displayType=='' ){  element.style.display=element.FadeState==1 ? 'block' : 'none';}
element.style.opacity=element.FadeState==1 ? '1' : '0';
element.style.filter='alpha(opacity='+(element.FadeState==1 ? '100' : '0')+')';
element.FadeState=element.FadeState==1 ? 2 : -2;
if (element.FadeState==2&&(onFadeIn)) {revolvingFadeIn=setTimeout (onFadeIn,2500)}
if (element.FadeState==-2&&(onFadeOut)) {revolvingFadeOut=setTimeout (onFadeOut,2500)}
return;}
 
element.FadeTimeLeft -=elapsedTicks;
var newOpVal=element.FadeTimeLeft/TimeToFade;
if(element.FadeState==1)
newOpVal=1 - newOpVal;
eid+' fade proceeds. FadeState is '+element.FadeState+'; opacity is '+element.style.opacity+'; filter is '+element.style.filter+'; display is '+element.style.display+'; visibility is '+element.style.visibility+'; zIndex is '+element.style.zIndex+'<br>'
element.style.opacity=newOpVal;
element.style.filter='alpha(opacity='+(newOpVal*100)+')';
if (element.FadeState==-2) return;
setTimeout("animateFade("+curTick+",'"+eid+"',"+TimeToFade+",'"+displayType+"','"+onFadeIn+"','"+onFadeOut+"')", 33);}
function wait(msecs){var start=new Date().getTime();
var cur=start
while(cur - start< msecs){cur=new Date().getTime();}}
var revolvingFadeIn, revolvingFadeOut,fadeCounter
function doNewPanelFade(inCounter){logInfo ('inCounter is '+inCounter+'; fadeCounter is '+fadeCounter)
if (inCounter+1>=fadePanels.length) return;
fade(fadePanels[inCounter],1500,'dis','','')
inCounter++; inCounter=checkFadeCounter(inCounter,fadePanels)
fadeCounter=inCounter
fade(fadePanels[inCounter],1500,'dis','doNewPanelFade('+inCounter+')','')}
function checkFadeCounter(inCount,inArray){if (inCount+1>=inArray.length) {return 0} else {return inCount}}
function logInfo(what){if (MM_findObj('information')) MM_findObj('information').innerHTML+=what+'<br>'}
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 printPopOptions (){return "toolbar=0,resizable=1,scrollbars=1,status=1,width=1024,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{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="550" 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="fade('"+divID+"',1000); "
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);
siteBase="eroticprints"
siteName="eroticprints.org"
jsFolder="js"
imageserver="/i"
sn=siteName
loginDir="/memberlogin"
userDir="/members"
function mouseOverPDF(){parent.defaultStatus="Click here to view a pdf sample of this book"}
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(){startscroll
doPageStuff ()
try{P7_initPM(0,0,1,100,40)}
catch (e){}}
function startscroll(){}
mouseOutIt()
function setCount(thisCount) {SetJSCookie('CartCount',thisCount,expdate,'/',localCookie);}
function soldOut() {alert("Sorry, this edition is currently out of stock, pending a reprint. \nCopies of the collector\'s or de Luxe edition may still be available, \nor for the Library edition please check back later."); return false;}
function resetCount(thisCount){SetJSCookie("CartCount",thisCount,null,'/',localCookie);}
if (ReadJSCookie("tmpAccess")=="true") isLoggedIn=true
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="550" 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="fade('"+divID+"',1000); "
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 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 FullScreen(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;
var thewindow=window.open(goWhere, '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;}
function deLuxeScreen (theBook,theImgName){if (IsNumeric(theImgName)){FullScreen ('/images/popup.asp?book='+theBook+'&imageID='+theImgName+'&w='+screen.width+'&h='+screen.height)}
else{FullScreen ('/images/popup.asp?book='+theBook+'&filename='+theImgName+'&w='+screen.width+'&h='+screen.height)}}
function bookScreen (theBook){if (ReadJSCookie("UName")=="None"||ReadJSCookie("UName")=="0" ){fade ('printPanel',1000)}
else{FullScreen ('/images/popup.asp?book='+theBook+'&w='+screen.width+'&h='+screen.height)}}
function writePrintPanel(){floatContent=''
floatContent+='<h2 align="left"><img src="'+imageserver+'/eroticprints/access/halt.jpg" hspace="15" border="1" align="left"><strong><font color="#990000">You are not&nbsp;<a href="'+loginDir+'/login.asp">logged in</a></font></strong></h2>'
floatContent+='<h3 align="left" style="line-height:160%!important;">Hi-res images are only available to registered ER Books members.</h3>'
floatContent+='<p style="font-size:14px;line-height:160%!important;"><a href="'+loginDir+'/">Click here to login or create an account</a><br></p>'
document.write (writeFloater('printPanel',floatContent))}
function MakeItSo(){if((detectOS()=='Windows')&&(detectBrowser()=='IE')){window.open(goWhere,'windowname','fullscreen=yes');} else {onload=FullScreen();}}
var AO=""
function MM_openNormalWindow(tI,iW,iH,alt,AO){window.name="mainWindow"
thumbName=xReplace (xReplace (xReplace (tI,"http://local.eroticprints.org/imageserver/i/",""),"http://imageserver.eroticprints.org/i/",""),"http://www.eroticprints.org/imageserver/i/","")
if (1==0) {newWindow=window.open('/images/popup.asp?book='+base+'&preview='+thumbName+'&w='+screen.width+'&h='+screen.height,"popup",'resizable=yes,scrollbars=auto,width='+iW*1.15+',height='+iH*1.15);
if (newWindow) {newWindow.focus();} else {alert('We tried to open a popup window, but it seems to have failed. Please check your browser settings and try again.')}}
FullScreen('/images/popup.asp?book='+base+'&preview='+thumbName+'&w='+screen.width+'&h='+screen.height)}
function P7_setPM(){var i,d='',h="<sty"+"le type=\"text/css\">",tA=navigator.userAgent.toLowerCase();if(window.opera){if(tA.indexOf("opera 5")>-1||tA.indexOf("opera 6")>-1){return;}}if(document.getElementById){for(i=1;i<20;i++){d+='ul ';h+="\n#p7PMnav "+d+"{position:absolute;left:-9000px;}";}
document.write(h+"\n<"+"/sty"+"le>");}}P7_setPM();
function P7_initPM(){var i,g,tD,tA,tU,pp,lvl,tn=navigator.userAgent.toLowerCase();if(window.opera){if(tn.indexOf("opera 5")>-1||tn.indexOf("opera 6")>-1){return;}}else if(!document.getElementById){return;}
p7PMp=arguments;p7PMct=new Array;tD=document.getElementById('p7PMnav');if(tD){tA=tD.getElementsByTagName('A');
for(i=0;i<tA.length;i++){tA[i].p7PMcl=p7PMct.length;p7PMct[p7PMct.length]=tA[i];g=tA[i].parentNode.getElementsByTagName("UL");
tA[i].p7PMsub=(g)?g[0]:false;ev=tA[i].getAttribute("onmouseover");if(!ev||ev=='undefined'){tA[i].onmouseover=function(){P7_PMtrig(this);};}ev=tA[i].getAttribute("onfocus");if(!ev||ev=='undefined'){tA[i].onfocus=function(){P7_PMtrig(this);};}
if(tA[i].p7PMsub){pp=tA[i].parentNode;lvl=0;while(pp){if(pp.tagName&&pp.tagName=="UL"){lvl++;}pp=pp.parentNode;}
tA[i].p7PMlv=lvl;}}tD.onmouseout=P7_PMclose;P7_PMopen();}}
function P7_PMtrig(a){var b,t;if(document.p7PMt){clearTimeout(document.p7PMt);}document.p7PMa=1;b=(a.p7PMsub)?'P7_PMshow(':'P7_PMtg(';
t='document.p7PMt=setTimeout("'+b+a.p7PMcl+')",160)';eval (t);}
function P7_PMshow(a,bp){var u,lv,oft,ofr,uw,uh,pp,aw,ah,adj,mR,mT,wW=0,wH,w1,w2,w3,sct,pw,lc,pwv,xx=0,yy=0,wP=true;
var iem=(navigator.appVersion.indexOf("MSIE 5")>-1)?true:false,dce=document.documentElement,dby=document.body;document.p7PMa=1;
if(!bp){P7_PMtg(a);}u=p7PMct[a].p7PMsub;if(u.p7pmax&&u.p7pmax==1){return;}u.p7pmax=1;lv=(p7PMp[0]==1&&p7PMct[a].p7PMlv==1)?true:false;
p7PMct[a].className=p7PMct[a].className.replace("p7PMtrg","p7PMon");oft=parseInt(p7PMp[3]);ofr=parseInt(p7PMp[4]);
uw=u.offsetWidth;uh=u.offsetHeight;pp=p7PMct[a];aw=pp.offsetWidth;ah=pp.offsetHeight;while(pp){xx+=(pp.offsetLeft)?pp.offsetLeft:0;
yy+=(pp.offsetTop)?pp.offsetTop:0;if(window.opera||navigator.userAgent.indexOf("Safari")>-1){if(p7PMct[a].p7PMlv!=1&&pp.nodeName=="BODY"){yy-=(pp.offsetTop)?pp.offsetTop:0;}}pp=pp.offsetParent;}
if(iem&&navigator.userAgent.indexOf("Mac")>-1){yy+=parseInt(dby.currentStyle.marginTop);}adj=parseInt((aw*ofr)/100);mR=(lv)?0:aw-adj;
adj=parseInt((ah*oft)/100);mT=(lv)?0:(ah-adj)*-1;w3=dby.parentNode.scrollLeft;if(!w3){w3=dby.scrollLeft;}w3=(w3)?w3:0;
if(dce&&dce.clientWidth){wW=dce.clientWidth+w3;}else if(dby){wW=dby.clientWidth+w3;}if(!wW){wW=0;wP=false;}wH=window.innerHeight;
if(!wH){wH=dce.clientHeight;if(!wH||wH<=0){wH=dby.clientHeight;}}sct=dby.parentNode.scrollTop;if(!sct){sct=dby.scrollTop;if(!sct){sct=window.scrollY?window.scrollY:0;}}pw=xx+mR+uw;if(pw>wW&&wP){mR=uw*-1;mR+=10;if(lv){mR=(wW-xx)-uw;}}lc=xx+mR;if(lc<0){mR=xx*-1;}
pw=yy+uh+ah+mT-sct;pwv=wH-pw;if(pwv<0){mT+=pwv;}u.style.marginLeft=mR+'px';u.style.marginTop=mT+'px';
if(p7PMp[2]==1){if(!iem){P7_PManim(a,20);}}u.className="p7PMshow";}
function P7_PMhide(u){var i,tt,ua;u.p7pmax=0;u.className="p7PMhide";ua=u.parentNode.firstChild;ua.className=ua.className.replace("p7PMon","p7PMtrg");}
function P7_PMtg(a,b){var i,u,tA,tU,pp;tA=p7PMct[a];pp=tA.parentNode;while(pp){if(pp.tagName=="UL"){break;}pp=pp.parentNode;}if(pp){tU=pp.getElementsByTagName("UL");for(i=tU.length-1;i>-1;i--){if(b!=1&&tA.p7PMsub==tU[i]){continue;}else{P7_PMhide(tU[i]);}}}}
function P7_PMclose(evt){var pp,st,tS,m=true;evt=(evt)?evt:((event)?event:null);st=document.p7PMa;if(st!=-1){if(evt){tS=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;if(tS){pp=tS.parentNode;while(pp){if(pp&&pp.id&&pp.id=="p7PMnav"){m=false;
document.p7PMa=1;break;}pp=pp.parentNode;}}if(m){document.p7PMa=-1;if(document.p7PMt){clearTimeout(document.p7PMt);}
document.p7PMt=setTimeout("P7_PMclr()",360);}}}}
function P7_PMclr(){var i,tU,tUU;document.p7PMa=-1;tU=document.getElementById('p7PMnav');if(tU){tUU=tU.getElementsByTagName("UL");if(tUU){for(i=tUU.length-1;i>-1;i--){P7_PMhide(tUU[i]);}}}}
function P7_PManim(a,st){var g=p7PMct[a].p7PMsub,sp=30,inc=20;st=(st>=100)?100:st;g.style.fontSize=st+"%";if(st<100){st+=inc;setTimeout("P7_PManim("+a+","+st+")",sp);}}
function P7_PMmark(){document.p7PMop=arguments;}
function P7_PMopen(){var i,x,tA,op,pp,wH,tA,aU,r1,k=-1,kk=-1,mt=new Array(1,'','');if(document.p7PMop){mt=document.p7PMop;}op=mt[0];if(op<1){return;}
tA=document.getElementById('p7PMnav').getElementsByTagName("A");wH=window.location.href;r1=/index\.[\S]*/i;for(i=0;i<tA.length;i++){if(tA[i].href){aU=tA[i].href.replace(r1,'');if(op>0){if(tA[i].href==wH||aU==wH){k=i;kk=-1;break;}}if(op==2){if(tA[i].firstChild){if(tA[i].firstChild.nodeValue==mt[1]){kk=i;}}}if(op==3&&tA[i].href.indexOf(mt[1])>-1){kk=i;}if(op==4){for(x=1;x<mt.length;x+=2){if(wH.indexOf(mt[x])>-1){if(tA[i].firstChild&&tA[i].firstChild.data){if(tA[i].firstChild.data==mt[x+1]){kk=i;break;}}}}}}}k=(kk>k)?kk:k;
if(k>-1){pp=tA[k].parentNode;while(pp){if(pp.nodeName=="LI"){pp.firstChild.className="p7PMmark"+" "+pp.firstChild.className;}
pp=pp.parentNode;}}if(kk>-1){document.p7PMad=1;}P7_PMadma();P7_PMadmb();}
function P7_PMadma(){var s,ss,i,j,a,g,b,c,d,t,h,tA,b,tP,r1,r2,tI,bA,aA,tB=new Array(),bC='',x=0,ur=1,mt=document.p7PMad;g=document.getElementById("p7PMnav");
b=document.getElementById("pmmcrumb");if(g&&b){c=b.getElementsByTagName("A");if(c&&c[0]){tP=c[0].parentNode.childNodes;r1=/<a/i;r2=/\/a>/i;
tI=c[0].parentNode.innerHTML;j=tI.search(r1);bA=tI.substring(0,j);j=tI.search(r2);aA=tI.substring(j+3);bC+=(bA)?bA:'';s=(aA)?aA:' &gt ';
if(!c[0].id||c[0].id!="pmmcn"){if(c[0].href!=window.location.href){tB[0]=c[0];x++;ur=2;}}tA=g.getElementsByTagName("A");for(i=0;i<tA.length;i++){if(tA[i].className.indexOf("p7PMmark")>-1){tB[x]=tA[i];x++;}}for(i=0;i<tB.length;i++){ss=(i>0)?s:'';a=(i==tB.length-1)?0:1;
d=(i==0&&c[0].id)?'id="'+c[0].id+'" ':' ';t=tB[i].firstChild.nodeValue;if(a==1||mt==1||x<ur){bC+=ss+'<a '+d+'hr'+'ef="'+tB[i].href+'">'+t+'</a>';}else{bC+=ss+t;}}if(mt==1||i<ur){ss=(i>0)?s:'';bC+=ss+document.title;}c[0].parentNode.innerHTML=bC;}}}
function P7_PMadmb(){var h='',g,i,tA,b,m=false;g=document.getElementById("p7PMnav");b=document.getElementById("pmmnext");if(g&&b){tA=g.getElementsByTagName("A");
for(i=tA.length-1;i>-1;i--){if(tA[i].className.indexOf("p7PMmark")>-1){m=true;break;}}if(m){if(i<tA.length-1){i++;}else{i=0;}
while(tA[i].href==window.location.href+"#"||tA[i].href=="javascript:;"){i++;if(i>tA.length-1){i=0;break;}}b.href=tA[i].href;b.innerHTML=tA[i].firstChild.nodeValue;}}}
