
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		salon_over = newImage("images/menu/salon-over.gif");
		school_over = newImage("images/menu/school-over.gif");
		work_over = newImage("images/menu/work-over.gif");
		staff_over = newImage("images/menu/staff-over.gif");
		access_over = newImage("images/menu/access-over.gif");
		other_over = newImage("images/menu/other-over.gif");
		link_over = newImage("images/menu/link-over.gif");
		home_over = newImage("images/menu/home-over.gif");
		preloadFlag = true;
	}
}

// :::::::: Sub Window Open for work ::::::::

var newwin;

function WorkOpen(URL) {

	if(newwin){

		if(!newwin.closed){

			newwin.location.href=URL;

			newwin.focus();

		}else{

			newwin = window.open(URL,'work','height=340,width=580');

		}

	}else{

		newwin = window.open(URL,'work','height=340,width=580');

	}

}

// :::::::: Sub Window Open for staff ::::::::

var newstaff;

function StaffOpen(URL) {

	if(newstaff){

		if(!newstaff.closed){

			newstaff.location.href=URL;

			newstaff.focus();

		}else{

			newstaff = window.open(URL,'staff','height=400,width=600,scrollbars=1');

		}

	}else{

		newstaff = window.open(URL,'staff','height=400,width=600,scrollbars=1');

	}

}

// :::::::: Sub Window Open for picture ::::::::

function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	if (imageType == "swf"){
	newWindow.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param name=quality value=high>');
	newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('</embed></object>');	}else{
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">'); 	}
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
	}

// :::::::: Sub Window Open for other ::::::::

var newother;

function otherOpen(URL,WIN,F) {

	if(newother){

		if(!newother.closed){

			newother.location.href=URL;

			newother.focus();

		}else{

			newother = window.open(URL,WIN,F);

		}

	}else{

		newother = window.open(URL,WIN,F);

	}

}
