
  function showIMG(src,w,h,opt)
  {
   var sW=0,sH=0;
   if(typeof(window.innerWidth)=='number') // Non-IE
   { sW=window.innerWidth; sH=window.innerHeight; }
   else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) // IE 6+ in 'standards compliant mode'
   { sW=document.documentElement.clientWidth; sH=document.documentElement.clientHeight; }
   else if(document.body && (document.body.clientWidth || document.body.clientHeight)) //IE 4 compatible
   { sW=document.body.clientWidth; sH=document.body.clientHeight; }

   if((sH/2)-(h/2)-40<0)
    document.getElementById('idShowImage').style.top="1px";
   else
    document.getElementById('idShowImage').style.top=(sH/2)-(h/2)-40+"px";

   document.getElementById('idShowImage').style.left=(sW/2)-(w/2)-32+"px";
   document.getElementById('idShowImage').style.display=(opt)?'block':'none';
   if(document.getElementById('idDivOption')) 
   {
    document.getElementById('idDivOption').style.display=(opt)?'none':'block';
    document.getElementById('idDivBuy').style.marginTop=(opt)?'30px':'5px';
   }  
   document.getElementById('idShowImage').innerHTML="<img src=\""+src+"_lg.jpg\" onclick=\"showIMG('',0,0,0);\" width=\""+w+"\" height=\""+h+"\" border=\""+0+"\" alt=\"Click To Close\" /><br/><a href=\"\" onclick=\"showIMG('',0,0,0); return false;\">Click To Close</a";
  }

  function globalSubmit(optStr)
  {
   $err=0; optArr=optStr.split(",");
   for(i=0;i<optArr.length;i++)
   {
    optID=optArr[i]; opt=document.getElementById(optID);
    opt.className='';
    if(opt.value=="" || opt.value.length<3) { $err=1; opt.className='err'; opt.focus(); }
   } 
   if($err) { alert("Please fill in all required fields."); return false; }
  } 

  function orderSubmit()
  {
   optStr='idEmail,idTel,idPostCode,idCounty,idCity,idStreet,idLastName,idFirstName,idCardExpiry,idCardNumber,idCardName,idCardSecurityCode,idCardPostCode';

   $err=0; optArr=optStr.split(",");
   for(i=0;i<optArr.length;i++)
   {
    optID=optArr[i]; opt=document.getElementById(optID);
    opt.className='';
    if(opt.value=="" || opt.value.length<2) { $err++; opt.className='err'; opt.focus(); }
   } 
   if($err) { alert("Please fill in all required fields."); return false; }
  } 

