		function addtocart()
		{
		if (document.prodinfo.txtvariant.value=="selectblank")
			{
				alert("Please select an option.");
			}
		else
			{   
				document.prodinfo.addtowishlist.value = "" ;
				document.prodinfo.addtocart.value = "addtocart" ;
				document.prodinfo.submit();
			}
		}
				
		function addtowishlist()
		{
		if (document.prodinfo.txtvariant.value=="selectblank")
			{
				alert("Please select an option.");
			}
		else
			{
				document.prodinfo.addtocart.value = "" ;
				document.prodinfo.addtowishlist.value = "addtowishlist" ;
				document.prodinfo.submit();
			}
		}


var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}
function CloseNewWin(){if(win!=null && win.open)win.close()}
window.onfocus=CloseNewWin;


function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_setTextOfTextfield(objName,x,newText) { //v3.0
  var obj = MM_findObj(objName); if (obj) obj.value = newText;
}
function doClear(txtsearch) {
     if (txtsearch.value == txtsearch.defaultValue) {
         txtsearch.value = ""
         txtsearch.style.color = ( parseFloat(txtsearch.value) < 0 ) ? 'red' : 'black'; 
        }
     }