// Do not edit! Unless you know what you are doing! 
// By Ton Hanchai

function openWinCenter(url,popW,popH) {
	var w = 480, h = 340;
	if (document.all || document.layers) {
		w = screen.availWidth;
   		h = screen.availHeight;
	}

	//var popW = 350, popH = 200;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
        var newWindow = window.open(url,'_blank','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=0');
	newWindow.focus();
}

function openWinCenterScroll(url,popW,popH) {
	var w = 480, h = 340;
	if (document.all || document.layers) {
		w = screen.availWidth;
   		h = screen.availHeight;
	}

	//var popW = 350, popH = 200;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
        var newWindow = window.open(url,'_blank','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=1');
	newWindow.focus();
}

function fullScreen(thisURL) {
window.open(thisURL, '', 'fullscreen=yes, scrollbars=auto');
}

function openWinCenterScrollResize(url,popW,popH) {
	var w = 480, h = 340;
	if (document.all || document.layers) {
		w = screen.availWidth;
   		h = screen.availHeight;
	}

	//var popW = 350, popH = 200;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
        var newWindow = window.open(url,'_blank','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=1, resizable=1');
	newWindow.focus();

	//msgWindow=window.open("","displayWindow","menubar=0,scrollbars=0,status=0,width=300,height=300")
	//newWindow = window.open('','_blank','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=1');
    	//newWindow.document.write("<head><title>Portfolio...</title><script language=Javascript src=global.js></script></head>")
	//newWindow.document.write("<body onload=shakeIt()>");
	//newWindow.document.write("<img src='imgs/r-glasses-book.jpg'");
	//newWindow.document.write("<a href=javascript:window.self.close()>close</a>");
	//newWindow.document.write("</body></html>");
}

function openwin(url) {
	var w = 480, h = 340;
	if (document.all || document.layers) {
		w = screen.availWidth;
   		h = screen.availHeight;
	}

	var popW = 600, popH = 500;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	var newWindow = window.open(url,'_blank','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=1');
	newWindow.focus();
}

function closeWin() {
	window.self.close();
}

function loadPrinter() {
	if (window.print) 
		window.print();
} 

function openwin500_375(url)
{
	var w = 480, h = 340;
	if (document.all || document.layers) {
		w = screen.availWidth;
   		h = screen.availHeight;
	}

	var popW = 375, popH = 500;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	var newWindow = window.open(url,'_blank','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=1');
	newWindow.focus();

        //window.open(url,"_blank","toolbar=no,statusbar=no,menubar=no,scrollbars=no,height=375,width=500,screenX=0,screenY=0,location=no,directory=no,resizable=no");
}
function openwin550_320(url)
{
	var w = 480, h = 340;
	if (document.all || document.layers) {
		w = screen.availWidth;
   		h = screen.availHeight;
	}

	var popW = 550, popH = 320;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	var newWindow = window.open(url,'_blank','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=1');
	newWindow.focus();

 	//window.open(url,"_blank","toolbar=no,statusbar=no,menubar=no,scrollbars=no,height=320,width=550,screenX=0,screenY=0,location=no,directory=no,resizable=no");
}

function openwin550_400(url)
{
	var w = 480, h = 340;
	if (document.all || document.layers) {
		w = screen.availWidth;
   		h = screen.availHeight;
	}

	var popW = 550, popH = 400;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	var newWindow = window.open(url,'_blank','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=1');
	newWindow.focus();

 	//window.open(url,"_blank","toolbar=no,statusbar=no,menubar=no,scrollbars=no,height=400,width=550,screenX=0,screenY=0,location=no,directory=no,resizable=no");
}