function shwnew(msg) {w=window.open('','msg','width=230,height=100,resizable');
 if (navigator.appName.substring(0,8)=='Netscape') w.focus();
 w.document.write('<html><title>Newlook Marketing</title>\n');
 w.document.write('<body bgcolor="#ffccff"><center><font style="font-family:verdana,arial; font-size:10pt">',msg,'</font></center></body></html>');
 }

function defn(cat,trm,srh) {
s=''
if (cat>'') {s+='?cat='+cat; w='width=600,height=400,resizable,scrollbars'}
else if (trm>'') {
 s+='?trm='+trm.replace(/ /g,'%20');
 if (srh=='*') w='width=600,height='+window.screen.availHeight-30+',resizable,scrollbars'
 else if (srh.substring(0,1)=='*') w=srh.substring(1,25)+',resizable,scrollbars'
 else w=(trm=='Lycra')?'width=600,height=400':'width=400,height=250'+',resizable,scrollbars'
 }
else {s+='?srh='+srh.replace(/ /g,'%20'); w=''}
window.open('defn.asp'+s,'defn',w)
}

function wndbut() {
if (history.length>0) document.write( bgif('back','javascript:history.back(1)',''),' &nbsp; ')
document.write( bgif('print','javascript:window.print()',''),' &nbsp; ')
if (self.name) document.write( bgif( 'close','javascript:window.close()',''))
}

function chg(pic,fld) {document[fld].src=pic;}

function sbutt() {return '<a href="javascript:window.close()" onmouseout="document.c.src=\'images/closea.gif\'" onmouseover="document.c.src=\'images/closeb.gif\'"><img name=c src="images/closea.gif" border=0></a> &nbsp; '+
 '<a href="javascript:window.print()" onmouseout="document.p.src=\'images/printa.gif\'" onmouseover="document.p.src=\'images/printb.gif\'"><img name=p src="images/printa.gif" border=0></a>'
}
function chgfd(){n=pdt['ncol'].value;for (i=1;i<=n;i++) {s=pdt['c'+i].src
 if (s.indexOf('a1.jpg')>0) s=s.replace('a1.jpg','b1.jpg')
 else s=s.replace('b1.jpg','a1.jpg') 
 pdt['c'+i].src=s
 }
}

function shwqty(qq,max) {qq=(qq=='')?0:Number(qq);
 for (i=1;i<8;i++) {k=(i==7)?12:i;
  if (k>max) k=max 
  document.write('<option value="',k,'"')
  if (qq==k) document.write(' selected')
  document.write('>',k,'</option>')
  if (k==max) break;
  }
 }

function chkbuy(htm,sizx,sizc) {
if (pdt.ccl.value=='Class') {alert('You need to specify a suitable compression class'); pdt.siz.focus();return false}
if (pdt.siz.value=='Size') {alert('You need to specify a suitable size'); pdt.siz.focus();return false}
n=pdt.nqty.value
if (n<1) n=pdt.ncol.value
if (n==0) return true;
m=0
for (i=1;i<=n;i++) m+=parseInt(pdt["qty"+i].value)
i=1

if (m==0) {alert('How many pairs would you like want to have? Please specify.'); pdt.qty1.focus();return false}
cs=sizx; cx=sizc; c=pdt.siz.value;

if (c.substring(0,1)=='F') c='F'
else if (c.substring(0,1)=='O') c='F'
else if (c.indexOf('year')>=0) c='L'
else {x=cs.indexOf('.'+c+'.');if (x>=0) c=cx.substring(x+1,x+2); else c='Y'}

c2=pdt.ccl.value
if (c2>'') {nc=20;
 if (c2=='Class 1   ') nc=10;
 if (c2=='Class 2   ') nc=15;
 c=String.fromCharCode(c.charCodeAt(0)+nc);
 }
else nc=''

nqt=0; nq=pdt.nqty.value
if (nq>0) {n=nq; s='&amp;nqty='+n+'&c1='+pdt.col1.value+'&f1='+pdt.cfn1.value
 for (i=1;i<=n;i++) {qt=parseInt(pdt["qty"+i].value)
  if (qt>0) {nqt++;x=cs.indexOf('.'+pdt['siz'+i].value+'.')
   if (x>=0) c=cx.substring(x+1,x+2);
   else c='Y';
   if (s.length>200) {alert('Warning: Too many items in one go. Some items not added');break;}
   s+='&s'+nqt+'='+pdt["siz"+i].value +'&q' +nqt+'='+qt +'&k' +nqt+'='+pdt["k"+i].value
     +'&p'+nqt+'='+pdt.style.value+'-'+c+pdt.ckey1.value
   }
  }
 }
else {s='&size='+pdt.siz.value
 for (i=1;i<=n;i++) {cl=pdt["col"+i].value
  if (cl>'') {qt=pdt["qty"+i].value
   if (qt>0) {nqt++
    if (s.length>200) {alert('Warning: Too many items in one go. Some items not added');break;} 
    s+='&c'+nqt+'='+cl+'&q'+nqt+'='+qt+'&f'+nqt+'='+pdt["cfn"+i].value+
    '&p'+nqt+'='+pdt.style.value+'-'+c+pdt["ckey"+i].value
	}
   }
  }
 }
if (nqt>0) setTimeout('location="'+htm+'&dcurr='+pdt.dcurr.value+s+'"',0);
return true
}
function chkcm() {
if (!cmt.nm.value) {alert('Your name is required'); cmt.nm.focus();return false}
if (!cmt.em.value) {alert('Your email address is required'); cmt.em.focus();return false}
if (!cmt.cm.value && !cmt.pv.value) {alert('Please provide either a product value rating or some comments or both'); cmt.cm.focus();return false}
}
function delcm() {
 if (confirm("Are you sure you wish to delete this comment?")) {document.cmt.action="pdtcm.asp?dele=1"; document.cmt.submit()}
 return false
 }

function bv(n,b){document[n].src='images/'+b+'b.gif'}
function bu(n,b){document[n].src='images/'+b+'a.gif'}

function sbmq() {
o=document.srh;
o.action='http:/\/www.google.com.sg/custom?domains="& host &"&q='+o.skey.value+'&sitesearch="& host &"&client=pub-1514411124107198&forid=1&ie=ISO-8859-1&oe=ISO-8859-1&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23336699%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3A336699%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BFORID%3A1%3B'; 
o.submit()
}
 
function bcmd2(c) {o=document.forms[0]; o.submit();}
function mh(o){o.className='boxh';}
function mo(o){o.className='boxo';}
function m0(o){o.className='box0';}
 