/********************************************************************************************
ZoomIN , ZoomOUT function (Javascript)

Updated: Apr 2003
Author: Nguyen Duong Minh (Obie)
WWW: http://ObieWebsite.SourceForge.net
Email: obie4web@yahoo.com
License: GNU(GPL)

Please visit my site for many free PHP and Javascript.
********************************************************************************************/

/******************CONFIGURATIONS*********************/

var keyin=122 		//Key to zooming in (is 'z')

var keyinCAPS=90 	//Key to zooming in (is 'Z')

var keyout=120 		//Key to zomming out (is 'x')

var keyoutCAPS=88 	//Key to zooming in (is 'X')

//==>>To set your own hotkey, please use Key Generator tool.
//==>>(has compressed with this file in archive "zoom.zip")

/**********************END****************************/

function zoomin(){
if (window.parent.document.body.style.zoom < 4.096){
if(window.parent.document.body.style.zoom!=0) window.parent.document.body.style.zoom*=1.6; 
else window.parent.document.body.style.zoom=1.6;
}
else alert("Opps! everything is too BIG");
}
function zoomout(){
if ((window.parent.document.body.style.zoom > 0.336)||(window.parent.document.body.style.zoom == 0)){
if(window.parent.document.body.style.zoom!=0) window.parent.document.body.style.zoom/=1.6; 
else window.parent.document.body.style.zoom=0.6;
}
else alert("Opps! everything is too SMALL");
}
if (document.layers) document.captureEvents(Event.KEYPRESS)

function checkzoom(e){
	if (document.layers){
		if (e.which==keyin || e.which==keyinCAPS) zoomin()
		else if (e.which==keyout || e.which==keyoutCAPS) zoomout()
	}
	else if (document.all){
		if (event.keyCode==keyin || event.keyCode==keyinCAPS) zoomin()
		else if (event.keyCode==keyout || event.keyCode==keyoutCAPS) zoomout()
	}
}

document.onkeypress=checkzoom