adjx = 10;
adjy = 30+12;
ratio = .2;
lamescape=4.75;
function Start(id){
	var name = navigator.appName;
	if (name == "Opera") {
		mw=window.open('largeimage.htm?id='+id,'product','scrollbars=no,toolbar=0,status=YES,location=0');
	}
	else {
		x=150;
		y=50;
		xresnow = x;
		yresnow = y;
		if (navigator.appVersion.indexOf("Mac")!=-1 && document.all) {
			xresnow-=0;
			yresnow-=0;
		}
		xl = (screen.availWidth/2)-(xresnow/2);
		tt = (screen.availHeight/2)-(yresnow/2);
		if (document.all) mw=window.open('largeimage.asp?id='+id,'product','scrollbars=no,width='+xresnow+',height='+yresnow+',left='+xl+',top='+tt);
		else {
			if (parseFloat(navigator.appVersion)<4.75)
				mw=window.open('largeimage.asp?id='+id,'product','left='+xl+',top='+tt+',width='+x+',height='+y+'scrollbars=no,toolbar=0,status=YES,location=0');
			else {
				mw=window.open('largeimage.asp?id='+id,'product','scrollbars=no,toolbar=0,status=YES,location=0');
				setTimeout("mwFix("+xl+","+tt+",x,y)",10);
			}
		}
	}
}

function mwFix(ll,tt,ww,hh) {
  ow=window.outerWidth-window.innerWidth;
  oh=window.outerHeight-window.innerHeight;
  mw.resizeTo(ww-ow,hh);
  mw.moveTo(ll,tt);
}
function toggleVisibility(id, NNtype, IEtype, WC3type) {
    if (document.getElementById) {
        eval("document.getElementById(id).style.visibility = \"" + WC3type + "\"");
    } else {
        if (document.layers) {
            document.layers[id].visibility = NNtype;
        } else {
            if (document.all) {
                eval("document.all." + id + ".style.visibility = \"" + IEtype + "\"");
            }
        }
    }
}
function resizer(xres,yres) {
  if (navigator.appVersion.indexOf("Mac")!=-1 || (document.layers && parseFloat(navigator.appVersion)<lamescape)) {
		lleft=(screen.availWidth/2)-(xres/2);
    ttop=(screen.availHeight/2)-(yres/2);
		if (document.all) {
			xres-=0;
			yres-=0;
		}
		ww=window.open(location,'productc','left='+lleft+',top='+ttop+',width='+(xres)+',height='+(yres+17)+',toolbar=0,status=0,location=0,scrollbars=no');
		window.location="bla.html";
		return;
  } else if (document.layers) yres+=7;
	xres = xres;
	yres = yres;
	xnew = xresnow+((xres-xresnow)*ratio);
	ynew = yresnow+((yres-yresnow)*ratio);
	setTimeout("resizeIt('"+xres+"','"+yres+"','"+xnew+"','"+ynew+"')",100);
}
	
function resizeIt(xres,yres,xnew,ynew){
	x = xresnow;
	y = yresnow;
  ow=0;
  oh=0;
  if (document.layers) {ow=-window.outerWidth+window.innerWidth+2;oh=-window.outerHeight+window.innerHeight;}
	resizeTo(x+ow,y+oh);
	moveTo(((screen.availWidth/2)-(xresnow/2)),((screen.availHeight/2)-(yresnow/2)));
	xresnow = xresnow+((xres-xresnow)*ratio)
	yresnow = yresnow+((yres-yresnow)*ratio)
	if (((xresnow-xres) <= .5)&&((xresnow-xres) >= -.5)) {  xnew=Math.floor(xres); ynew=Math.floor(yres); resizeTo(xnew+ow,ynew+oh+30);}		
	if (xnew != xres) setTimeout("resizeIt('"+xres+"','"+yres+"','"+xnew+"','"+ynew+"')",10);

}
