acframeinuse = false; accurrentp = 0; function openSite(theURL) { anw = window.open(theURL,'newWindow','toolbar=yes,location=yes.html,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=700,height=600'); anw.focus(); anw.resizeTo(700,600);}
function openSubwindow(message,theURL,width,height,tools) { openSubwindow2('subWindow',message,theURL,width,height,tools);}
function openSubwindow2(name,message,theURL,width,height,tools) { if(tools=='yes'){ mn = 'yes'; st = 'yes'; sc = 'yes';}
if(tools=='partly'){ st = 'yes'; sc = 'yes'; mn = 'no';}
if(tools=='no'){ st = 'no'; sc = 'no'; mn = 'no';}
if (message != "") { anw = window.open('',name,'toolbar=no,location=no.html,directories=no,status='+st+',menubar='+mn+',scrollbars='+sc+',resizable=yes,width='+width+',height='+height); anw.focus(); anw.resizeTo(width+20,height+20); anw.document.write('<HTML><HEAD><TITLE>Please wait...</TITLE></HEAD><STYLE></STYLE><LINK REL=stylesheet TYPE=text/css HREF=/admin.css><BODY ><BR><CENTER>'); anw.document.write('<TABLE><TR><TD ALIGN=center><BIG><B>Please wait...<BR><BR>'); anw.document.write('... ' + message + ' </B></BIG>'); anw.document.write('</TD></TR></TABLE></CENTER></BODY></HTML>'); if (theURL != "") { anw.location.href = theURL;}
} else { anw = window.open(theURL,name,'toolbar=no,location=no.html,directories=no,status='+st+',menubar='+mn+',scrollbars='+sc+',resizable=yes,width='+width+',height='+height); anw.focus(); anw.resizeTo(width+20,height+20);}
}
function copyObj(obj) { var i; var newObj = new Object(); for (i in obj) { newObj[i] = obj[i];}
return newObj;}
function openLink(theURL,newWindow) { if(newWindow) { window.open(theURL,'newWindow');}
else { window.location.href=theURL;}
}
function checkDate( f, al ) { var errf = ""; var sls1 = f.value.indexOf("..\\..\\index.html",0); var sls2 = f.value.indexOf("..\\..\\index.html",sls1+1); if(f.value == "") return true; if ((sls1 == -1) || (sls2 == -1)){ errf = "The DATE has been entered incorrectly";} else { var d = parseInt(f.value.substring(0,sls1),10); var m = parseInt(f.value.substring(sls1+1,sls2),10); var y = parseInt(f.value.substring(sls2+1,f.value.length),10); var sy = f.value.substring(sls2+1,f.value.length); if(isNaN(d) || isNaN(m) || isNaN(y)) { errf = "The date contains spurious characters. Please use numerical characters and the / character only";} else { if(((y > 9999) || (y < 1000)) && !((sy.length==2) && (y >= 0 || y <= 99))) errf = "The year " + y + "  is invalid. Please amend"; if((m > 12) || (m < 1)) errf = "The month " + m + " is invalid. Please check and try again"; if((d > 31) || (d < 1)) errf = "The day " + d + "  is invalid. Please check and try again"; if((m == 1) && (d > 31)) errf = "January only contains 31 days. Please amend"; if((m == 2) && (d > 29)) errf = "February only contains (at most) 29 days. Please amend"; if((m == 3) && (d > 31)) errf = "March only contains 31 days. Please amend"; if((m == 4) && (d > 30)) errf = "April only contains 30 days. Please amend"; if((m == 5) && (d > 31)) errf = "May only contains 31 days. Please amend"; if((m == 6) && (d > 30)) errf = "June only contains 30 days. Please amend"; if((m == 7) && (d > 31)) errf = "July only contains 31 days. Please amend"; if((m == 8) && (d > 31)) errf = "August only contains 31 days. Please amend"; if((m == 9) && (d > 30)) errf = "September only contains 30 days. Please amend"; if((m == 10) && (d > 31)) errf = "October only contains 31 days. Please amend"; if((m == 11) && (d > 30)) errf = "November only contains 30 days. Please amend"; if((m == 12) && (d > 31)) errf = "December only contains 31 days. Please amend";}
}
if (errf != "") { if(al) alert(errf + " : NOTE (Use the format dd/mm/yyyy or dd/mm/yy)"); f.value = ""; return false;}
else { return true;}
}
function checkNumeric( f, m ) { var t; if ((f.value+'' == '') && (m+'' == '')) { f.value = 0; return true;}
t = parseFloat(f.value,10); if (isNaN(f.value)) { alert("The field MUST be numeric."); f.value = m; return false;}
if((m+'' != '') && (isNaN(t) || (t.toString() == '') || (t < m))) { alert("The field MUST be at least " + m); f.value = m; return false;}
return true;}
function checkEmail( f, m ) { if (f.value != '') { if (f.value.indexOf('@',0) > 0) { if (f.value.indexOf(' ',0) < 0) { return true;}
else { if (m) { alert('The email address cannot contain spaces.');}
f.value = ''; return false;}
} else { if (m) { alert('The field MUST contain a valid email address.');}
f.value = ''; return false;}
} else { return true;}
}
function checkURL( f ) { if (f.value != '') { if ((f.value.indexOf('http\\index.html',0) >= 0) || (f.value.indexOf('https\\index.html',0) >= 0) || (f.value.indexOf('ftp\\index.html',0) >= 0) || (f.value.indexOf('mailto:',0) >= 0) || (f.value.indexOf('javascript:',0) >= 0)) { if (f.value.indexOf(' ',0) < 0) { return true;} else { alert('The LINK address cannot contain spaces.'); f.value = ''; return false;}
} else { alert('The field MUST contain a valid URL (starting with http:// or similar).'); f.value = ''; return false;}
} else { return true;}
}
function checkText( f, s ) { if ((f.value != '') && (s > 0)) { if (f.value.length > s) { alert('The field has exceeded its maximum size of ' + s + ' characters.'); f.value = f.value.substring(0,s); return false;} else { return true;}
} else { return true;}
}
function FormatNumber(nu,de,se)
{ nu += ""
de += ""
se += ""
if((se == "") || (se.length > 1)) se = "."
if(nu.length == 0) nu = "0"
var onu = nu
var Sign = 1
var Pad = ""
var Count = 0
if(parseFloat(nu)){ nu = parseFloat(nu) }
else { nu = 0 }
if((parseInt(de,10)) || (parseInt(de,10) == 0)){ de = parseInt(de,10)}
else { de = 2}
if(nu < 0) { Sign = -1
nu *= Sign
}
if(de < 0) de *= -1
nu = "" + Math.floor(nu * Math.pow(10,de + 1) + 5)
if((nu.substring(1,2) == '.')||((nu + '')=='NaN')) return(onu)
if(nu.length < de +1) { for(Count = nu.length; Count <= de; Count++) Pad += "0"
}
nu = Pad + nu
if(de == 0){ nu = nu.substring(0, nu.length -1)}
else { nu = nu.substring(0,nu.length - de -1) + se + nu.substring(nu.length - de -1, nu.length -1)}
if(Sign == -1) nu = "-" + nu
if(nu.length == 0) nu="0"
if(nu.substring(0,1) == '.') nu="0"+nu
return(nu)
}
function wishlistmove(f,p,i) { eval('newpage = document.iwwishlist.iwseqno'+i+'.value'); window.location.href = f + '?ProductID='+ p + '&iwwishlistmove=1&position=' + newpage;}
function wishlistmove2(f,p,i,w) { eval('newpage = document.iwwishlist' + w + '.iwseqno'+i+'.value'); window.location.href = f + '?ProductID='+ p + '&iwwishlistmove=1&position=' + newpage;}
function iwaddtocart(f,p,o,r) { qbit = ''; q = 1; if (document.frmQty) { eval('q = document.frmQty.quantity' + p + '.value'); qbit = '&quantity' + p + '=' + q;}
if (document.iwprodopt) { eval('document.iwprodopt.Quantity' + p + '.value = \'' + q + '\''); obj = document.iwprodopt; if (!(iwprodoptcheck())) { return;}
obj.AddProductID.value = p; if (r) { obj.Rent.value = r;}
obj.target = ''; obj.action = f; obj.submit(); return;}
iscat = false; eval('iscat = (document.searchform' + o + ');'); if (iscat) { o = 'document.searchform' + o; eval(o + '.target = \'\''); eval(o + '.action = \'' + f + '\''); eval(o + '.AddProductID.value='+p); eval(o + '.submit()'); return;}
e = '&ProductID=' + p; if (r) e = '&rent=1';

if (f != document.location.href) { document.location.href = f + '?AddProductID=' + p + e + qbit + '&continuepage='+document.location.href; }
	else { document.location.replace(f + '?AddProductID=' + p + e + qbit); }

return;}
function showprod(c,p) { if (!(accurrentp == p)) { accurrentp = p; if ((window.frames["actionframe"]) && ((testdoc('acfieldtext',window)) || (testdoc('acfieldimage',window)) || (testdoc('acfieldlongdesc',window)))) { counter = 300000
while ((acframeinuse = true) && counter > 0) { counter = counter - 1;}
acframeinuse = true; window.frames["actionframe"].document.location.replace('..\\aqua\\MS_21.html'+c+'&ProductID='+p);}
}
}
function togglewl(c,p) { if (window.frames["actionframe"]) { counter = 300000
while ((acframeinuse = true) && counter > 0) { counter = counter - 1;}
acframeinuse = true; window.frames["actionframe"].document.location.replace('..\\aqua\\MS_20.html'+c+'&ProductID='+p);}
}
function togglecart(c,p) { if (window.frames["actionframe"]) { counter = 300000
while ((acframeinuse = true) && counter > 0) { counter = counter - 1;}
acframeinuse = true; window.frames["actionframe"].document.location.replace('..\\aqua\\MS_23.html'+c+'&ProductID='+p);}
}
function changeratings(c,o,p,a,r,m,on,off,on2,off2) { var i; if(document.all('acratingper'+o+'-'+p)) { document.all('acratingper'+o+'-'+p).innerHTML = parseInt(r/m*100) + '%';}
for(i=1;i<=m;i=i+1){ if(a>=i) { if(document.all('acrating'+o+'-'+p+'-'+i)) { if(r>=i){ document.all('acrating'+o+'-'+p+'-'+i).src=on2;}
else { document.all('acrating'+o+'-'+p+'-'+i).src=on;}
}
} else { if(document.all('acrating'+o+'-'+p+'-'+i)) { if(r>=i){ document.all('acrating'+o+'-'+p+'-'+i).src=off2;}
else { document.all('acrating'+o+'-'+p+'-'+i).src=off;}
}
}
}
window.frames["actionframe"].document.location.href='..\\aqua\\MS_22.html'+c+'&ProductID='+p+'&Rating='+(r/m);}
function ratingni(c,p,off,on,ob) { if(ob.src.substr(ob.src.lastIndexOf('..\\..\\index.html')) == on.substr(on.lastIndexOf('..\\..\\index.html'))) { ob.src = off; window.frames["actionframe"].document.location.href='..\\aqua\\MS_22.html'+c+'&ProductID='+p+'&NotInterested=0';} else { ob.src = on; window.frames["actionframe"].document.location.href='..\\aqua\\MS_22.html'+c+'&ProductID='+p+'&NotInterested=1';}
}
function doc(id,f) { if(f.document.all) { return f.document.all[id];} else { return f.document.getElementById(id);}
}
function testdoc(id,f) { thetest = false; if(f.document.all) { if (f.document.all[id]) { thetest = true;};} else { if (f.document.getElementById(id)) { thetest = true;};}
return thetest;}
window.onerror = new Function('return true;'); 