<!--
var newwinstat = null;
var newinstpri = null;
var garpage = null;
var bName=navigator.appName;
var bVer=parseInt(navigator.appVersion);


function mm() {
/* move left panel to top of screen */
	return 1;
	toppos = 91 // the start position
	if (window.innerHeight)
		pos = window.pageYOffset;
	else if (document.documentElement && document.documentElement.scrollTop)
		pos = document.documentElement.scrollTop;
	else if (document.body)
		pos = document.body.scrollTop;
	lp = document.getElementById("leftpanel");
	tp = document.getElementById("toppanel");
	if (lp.pixelTop) {
		lp.style.pixelTop = toppos + pos;
		tp.style.pixelTop = pos;
	}
	else { // Mozilla
		lp.style.top = toppos + pos;
		tp.style.top = pos;
	}
//	tp.style.pixelTop = pos;
//	oCMenu_top0_0.style.pixelTop  = 61 + pos;
//	oCMenu_top1_0.style.pixelTop  = 61 + pos;
//	oCMenu_top2_0.style.pixelTop  = 61 + pos;
//	oCMenu_top3_0.style.pixelTop  = 61 + pos;
//	oCMenu_top4_0.style.pixelTop  = 61 + pos;
//	oCMenu_top5_0.style.pixelTop  = 61 + pos;
//	oCMenu_sub00.style.pixelTop  =  pos;
//	oCMenu_sub01.style.pixelTop  = 20 +  pos;
//	oCMenu_sub02.style.pixelTop  = 50 +  pos;
}

function executepage(page,newwin)
{
 if (newwinstat == null || newwinstat.closed)
 { 
        txt=page;

        if (newwin == "true")
           {
            if (bName=="Netscape" && bVer<5) {
	  	newwinstat = window.open(txt, "Garments",'height=408,width=408');
             } else {
              if (window.screen.width < 1024)
                newwinstat = window.open(txt,'Garments', 'fullscreen=0,status=0,scrollbars=0,toolbar=0,screenX=50,left=50,screenY=50,top=50,height=450,width=408');
              else
                newwinstat = window.open(txt,'Garments', 'fullscreen=0,status=0,scrollbars=0,toolbar=0,screenX=50,left=50,screenY=50,top=50,height=508,width=508');
			  // newwinstat.location.reload();
             }
           }
        else
           {	
             top.location=txt;
	     window.location=txt;
           }
 }
 else
  {
	alert("The Garment Designer is open in another window. Please close that first. Click OK to continue.");
	newwinstat.focus(); 
  }
}


function executeprintpage(page,newwin)
{
 if (newinstpri == null || newinstpri.closed)
 { 
        txt=page;
        if (newwin == "true")
           {
            if (bName=="Netscape" && bVer<=5) {
	  	newinstpri = window.open(txt, "Print",'height=900,width=640');
             } else {
              if (window.screen.width < 1024)
//					newinstpri = window.open(txt, "Print");
                newinstpri = window.open(txt,'Print', 'fullscreen=0,status=0,scrollbars=0,toolbar=0,screenX=1,left=1,screenY=1,top=1,height=900,width=640')
              else
                newinstpri = window.open(txt,'Print', 'fullscreen=no,status=no,scrollbars=no,toolbar=no,screenX=50,left=50,screenY=50,top=50,height=900,width=640');
             }
           }
        else
           {	
             top.location=txt;
	     window.location=txt;
           }
 }
 else
  {
	alert("The Product Print is open in another window. Please close that first. Click OK to continue.");
	newinstpri.focus(); 
  }
}


function showgarment(imgdir,imgname,orientation)
{
 if (garpage == null || garpage.closed)
 { 
        txt="showimage.py?imgdir=" + imgdir + "&imgname=" + imgname;
        if (orientation == "H")
           {
            if (bName=="Netscape" && bVer<=5) {
	  	garpage = window.open(txt, "Garments",'height=271,width=378');
             } else {
              if (window.screen.width < 1024)
                newwinstat = window.open(txt,'Garments', 'fullscreen=0,status=0,scrollbars=0,toolbar=0,screenX=1,left=1,screenY=1,top=1,height=271,width=378')
              else
                garpage = window.open(txt,'Garments', 'fullscreen=no,status=no,scrollbars=no,toolbar=no,screenX=50,left=50,screenY=50,top=50,height=271,width=378');
             }
           }
        else
           {
            if (bName=="Netscape" && bVer<=5) {
	  	garpage = window.open(txt, "Garments",'height=378,width=235');
             } else {
              if (window.screen.width < 1024)
                newwinstat = window.open(txt,'Garments', 'fullscreen=0,status=0,scrollbars=0,toolbar=0,screenX=1,left=1,screenY=1,top=1,height=378,width=235')
              else
                garpage = window.open(txt,'Garments', 'fullscreen=no,status=no,scrollbars=no,toolbar=no,screenX=50,left=50,screenY=50,top=50,height=378,width=235');
             }
           }
 }
 else
  {
	alert("The Image Viewer is open in another window. Please close that first. Click OK to continue.");
	garpage.focus(); 
  }
}


function cleanUp()
{
	if (newwinstat != null)
	  if (newwinstat.closed == false)
        {
          newwinstat.close();
        }  

	if (garpage != null)
	  if (garpage.closed == false)
        {
          garpage.close();
        }  

}


//-->
