// JavaScript Document

//popup window
function newwindow (site,name,width,height) {					//filelink, windowname, windowwidth, windowheight
var positionX=((screen.availWidth / 2) - width / 2); 			//centerpos horizontal
var positionY=((screen.availHeight / 2) - height / 2); 			//centerpos vertical

popup = window.open(site, name, 'width="+width+", height="+height+", top="positionX", left="positionY", menubar="no", toolbar="no", scrollbars="no", resizable="no"')

popup.resizeTo(width,height);									//window size
popup.moveTo(positionX,positionY);								//set position
}

//popup window II
function pwindow(doc, params) {
	open(doc, "window", params);
}

//mail address
function mail (host, user) {
var res = "";
var res_h = "";
for (var n = 0; n < user.length; n++)
res += String.fromCharCode(user.charCodeAt(n));
for (var n = 0; n < host.length; n++)
res_h += String.fromCharCode(host.charCodeAt(n));
if (res.indexOf('@') < 0 )
res = res + '@' + res_h;
  location = "mail" + "to:" + res;
}


//img preload
function imgpreload () {
	
	document.preload = new Array ();							//array function
	
	if (document.images) {
		
		for(var i = 0; i < imgpreload.arguments.length; i++) {	//image load to array			
			document.preload[i] = new Image();
			document.preload[i].src = imgpreload.arguments[i];
			}
		
		}
	
	}
