function PosiImp(impr) 
{
if (document.all)
{var xMax = screen.width, yMax = screen.height;}
else
{var xMax = window.outerWidth, yMax = window.outerHeight;}
var w = 750;
var h = (yMax - 100);
window.open(impr,'fiche',
'width='+w+',height='+h+',screenX=0,screenY=0,top=0,left=0,scrollbars=yes');
}
function resol() {
    var w = screen.width;
    if (!w)
    {w = 800;}
    else
    {
      if (w < 100)
      {w = 800;}
    }
    return w;
}
function zoomch(mapaged, monnomd) {
var w=550, h=401;
var xOffset = 0;
var yOffset = 0;
window.open(mapaged,monnomd,
'width='+w+',height='+h+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',scrollbars=no');
}
function posimaj(mapagel) {
window.open(mapagel,'pagemaj',
'width=580,height=280,screenX=0,screenY=0,top=0,left=0,scrollbars=no');
}
function posimajl(mapagel,maw,mah) {
window.open(mapagel,'pagemaj',
'width='+maw+',height='+mah+',screenX=0,screenY=0,top=0,left=0,scrollbars=yes');
}
function posidet(mapaged, monnomd) {
var w=300, h=280;
if (document.all)
var xMax = screen.width, yMax = screen.height;
else
if (document.layers)
var xMax = window.outerWidth, yMax = window.outerHeight;
else
var xMax = 800, yMax=600;
var xOffset =(xMax)?(xMax-w)/2:100, yOffset =(yMax)?(yMax-h)/2:100;
window.open(mapaged,monnomd,
'width='+w+',height='+h+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',scrollbars=no');
}
function posizfab(mapaged, monnomd) {
var w=379, h=402;
var xOffset = 0;
var yOffset = 0;
window.open(mapaged,monnomd,
'width='+w+',height='+h+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',scrollbars=no');
}
function posizoom(mapaged, monnomd) {
var w=1002, h=626;
var xOffset = 0;
var yOffset = 0;
window.open(mapaged,monnomd,
'width='+w+',height='+h+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',scrollbars=no');
}
function posizoom8(mapaged, monnomd) {
var w=779, h=460;
var xOffset = 0;
var yOffset = 0;
window.open(mapaged,monnomd,
'width='+w+',height='+h+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',scrollbars=no');
}
function posicgv(mapagec) {
var w=792, h=480;
if (document.all)
var xMax = screen.width, yMax = screen.height;
else
if (document.layers)
var xMax = window.outerWidth, yMax = window.outerHeight;
else
var xMax = 800, yMax=600;
var xOffset =(xMax)?(xMax-w)/2:100, yOffset =(yMax)?(yMax-h)/2:100;
yOffset = 0;
if (yMax > 600)
var h = 660;
window.open(mapagec,'pagecgv',
'width='+w+',height='+h+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',scrollbars=yes');
}
function chrad(no) {
document.form1.coul[no].checked = "true"; 
} 
function chrad1() {
document.form1.coul.checked = "true"; 
}
function chmes1() { 
document.form1.mesu1.value = ""; 
} 
function chmes2() { 
document.form1.mesu2.value = ""; 
} 
function chmes3() { 
document.form1.mesu3.value = ""; 
} 
function valcoul()
{
var i="1";
coulsuite = document.form1.coul[3];
if (!coulsuite)
{
if (document.form1.coul[0].checked == false && document.form1.coul[1].checked == false && document.form1.coul[2].checked == false && i == "1")
        {alert("Please choose the color");
         i="0";}
}   
else
{
if (document.form1.coul[0].checked == false && document.form1.coul[1].checked == false && document.form1.coul[2].checked == false && document.form1.coul[3].checked == false && document.form1.coul[4].checked == false && document.form1.coul[5].checked == false && i == "1")
        {alert("Please choose the color");
         i="0";}
}      
if (i=="1") document.form1.submit();
} 
function valimp1()
{
var i="1";
if (document.form1.coul.checked == false && i == "1")
        {alert("Please choose the print");
         i="0";}    
if (i=="1") document.form1.submit();
}
function valimpn(cmaxi)
{
  var i="1";
  var ok="0";
  for (j=0;j<=cmaxi;j++)
  {
    if (document.form1.coul[j].checked == true)
       {ok="1";}
  }
  if (ok=="0")
   {alert("Please choose the print");
     i="0";}        
  if (ok=="1") document.form1.submit();
}
function valpiqu1()
{
var i="1";
if (document.form1.piqu.checked == false && i == "1")
        {alert("Please choose the stitching");
         i="0";}    
if (i=="1") document.form1.submit();
}
function valpiqun(cmaxi)
{
  var i="1";
  var ok="0";
  for (j=0;j<=cmaxi;j++)
  {
    if (document.form1.piqu[j].checked == true)
       {ok="1";}
  }
  if (ok=="0")
   {alert("Please choose the stitching");
     i="0";}        
  if (ok=="1") document.form1.submit();
}    
function valcoul1()
{
var i="1";
if (document.form1.coul.checked == false && i == "1")
        {alert("Please choose the color");
         i="0";}    
if (i=="1") document.form1.submit();
}
function valcouln(cmaxi)
{
  var i="1";
  var ok="0";
  for (j=0;j<=cmaxi;j++)
  {
    if (document.form1.coul[j].checked == true)
       {ok="1";}
  }
  if (ok=="0")
   {alert("Please choose the color");
     i="0";}        
  if (ok=="1") document.form1.submit();
}    
function valtail()
{
var i="1";
docsuite4 = document.form1.tail[4];
docsuite3 = document.form1.tail[3];
docsuite2 = document.form1.tail[2];
if (!docsuite2)
{
if (document.form1.tail[0].checked == false && document.form1.tail[1].checked == false && i == "1")
        {alert("Please choose the size");
         i="0";}
}
else
{
   if (!docsuite3)
   {
   if (document.form1.tail[0].checked == false && document.form1.tail[1].checked == false && document.form1.tail[2].checked == false && i == "1")
           {alert("Please choose the size");
            i="0";}
   }
   else
   {
     if (!docsuite4)
     {
     if (document.form1.tail[0].checked == false && document.form1.tail[1].checked == false && document.form1.tail[2].checked == false && document.form1.tail[3].checked == false && i == "1")
             {alert("Please choose the size");
              i="0";}
     }
     else
     {
     if (document.form1.tail[0].checked == false && document.form1.tail[1].checked == false && document.form1.tail[2].checked == false && document.form1.tail[3].checked == false && document.form1.tail[4].checked == false && i == "1")
             {alert("Please choose the size");
              i="0";}
     }  
   }
}
if (i=="1") document.form1.submit();
} 
function valopt()
{
  var i="1";
  if (document.form1.opt1[0].checked == false && document.form1.opt1[1].checked == false && i == "1")
          {alert("Please check YES or NO for the 1st option");
           i="0";}
  if (document.form1.opt2)
  {
    if (document.form1.opt2[0].checked == false && document.form1.opt2[1].checked == false && i == "1")
            {alert("Please check YES or NO for the 2nd option");
             i="0";}
  } 
  if (document.form1.opt3)
  {
    if (document.form1.opt3[0].checked == false && document.form1.opt3[1].checked == false && i == "1")
            {alert("Please check YES or NO for the 3rd option");
             i="0";}
  }  
  if (document.form1.mesu1)
  {
     if (document.form1.opt1[0].checked == true && document.form1.mesu1.value.length == 0 && i == "1")
            {alert("If you choose the 1st option, specify also the length");
             i="0";}
     if (document.form1.opt1[0].checked == false && document.form1.mesu1.value.length != 0 && i == "1")
            {alert("Either you do not choose the 1st option : then erase the length,\r\nor you choose it, then check YES");
             i="0";}
  }  
  if (document.form1.mesu2)
  {
     if (document.form1.opt2[0].checked == true && document.form1.mesu2.value.length == 0 && i == "1")
            {alert("If you choose the 2nd option, specify also the length");
             i="0";}
     if (document.form1.opt2[0].checked == false && document.form1.mesu2.value.length != 0 && i == "1")
            {alert("Either you do not choose the 2nd option : then erase the length,\r\nor you choose it, then check YES");
             i="0";}
  } 
  if (document.form1.mesu3)
  {
     if (document.form1.opt3[0].checked == true && document.form1.mesu3.value.length == 0 && i == "1")
            {alert("If you choose the 3rd option, specify also the length");
             i="0";}
     if (document.form1.opt3[0].checked == false && document.form1.mesu3.value.length != 0 && i == "1")
            {alert("Either you do not choose the 3rd option : then erase the length,\r\nor you choose it, then check YES");
             i="0";}
  } 
  if (i=="1") document.form1.submit();
}         
function valajout(topimp)
{
  var i="1";
  var libc = "Please choose the color";
  var libt = "Please choose the size";
  if (topimp == 1)
  {libc = "Please choose the print";}
  if (document.form1.choixcoul1)
  {
    libc = "Please choose the color of top";
  }
  if (document.form1.choixtail1)
  {
    libt = "Please choose the size of top";
  }
  if (document.form1.choixcoul)
  {
    if (document.form1.choixcoul.value == "Click" && i == "1")
            {alert(libc);
            document.form1.choixcoul.focus();
             i="0";}
  }
  if (document.form1.choixcoul1)
  {
    if (document.form1.choixcoul1.value == "Click" && i == "1")
            {alert("Please choose the color of bottom");
            document.form1.choixcoul1.focus();
             i="0";}
  }
  if (document.form1.choixpiqu)
  {
    if (document.form1.choixpiqu.value == "Click" && i == "1")
            {alert("Please choose the stitching");
            document.form1.choixpiqu.focus();
             i="0";}
  }
  if (document.form1.choixtail)
  {
    if (document.form1.choixtail.value == "Click" && i == "1")
            {alert(libt);
            document.form1.choixtail.focus();
             i="0";}
  }
  if (document.form1.choixtail1)
  {
    if (document.form1.choixtail1.value == "Click" && i == "1")
            {alert("Please choose the size of bottom");
            document.form1.choixtail1.focus();
             i="0";}
  }
  if (document.form1.coteferm)
  {
    if (document.form1.coteferm.selectedIndex == 0 && i == "1") {
     alert("Please choose left or right fastening");
    document.form1.coteferm.focus()
     i="0";}
  }
  if (document.form1.choixopt)
  {
    if (document.form1.choixopt.value == "Click" && i == "1")
            {alert("Please choose free option(s)");
            document.form1.choixopt.focus();
             i="0";}
  }
  if (i=="1") document.form1.submit();
}
function addop(formuls)
{
    prod = document.form1.p.value; 	  
    document.form1.action = "tempomod1.php?p=prod";
    document.form1.submit();
}
function addom()
{
    prod = document.form1.p.value;
    prom = document.form1.m.value; 	  
    document.form1.action = "tempomod1m.php?m=prom&p=prod";
    document.form1.submit();
}
function addfav()
{
if (document.all)
{
window.external.AddFavorite(location.href, document.title);
}
else
{
alert('You can do CTRL + D to add this page to your bookmarks.');
}
}
function makevisible(cur,which)
{
if(document.getElementById)
  {
  if (which==1)
    {
    if(document.all)
    	cur.filters.alpha.opacity=100
    else
    	cur.style.setProperty("-moz-opacity", 1, "");
    }
  else
    {
    if(document.all)
    	cur.filters.alpha.opacity=60
    else
    	cur.style.setProperty("-moz-opacity", .4, "");
    }
  }
}
function demvid() {
if(!confirm('Do you really want to  empty the basket completely ?')) {return false;} 
}

