<!--


// Path to images directory
var gsPath    = "../images/";
var pubImg=1;
function imgOff(sName) {
	if (document.images) {
		document[sName].src = gsPath + sName + "_off.gif";
	}
}

function imgOn(sName) {
	if (document.images) {
		document[sName].src = gsPath + sName + "_on.gif";
	}
}
function imgOffJ(sName) {
	if (document.images) {
        if (pubImg != 0) {
            var tmp= gsPath + "n_galleryicon" + pubImg + "_on.gif";
            //roll over on myself
            if (gsPath+sName+"_on.gif"==tmp){
                //do nothing
                return;
            }
        }        
        //set img off
		document[sName].src = gsPath + sName + "_off.gif";
	}
}

function imgOnJ(sName) {
	if (document.images) {
   		document[sName].src = gsPath + sName + "_on.gif";
	}
}

function openWindow(url,winName,w,h) {
// parameters:	url = URL of the popup window
// 				winName = window name
// 				w = width
// 				h = height
	leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	topPosition = (screen.height) ? (screen.height-h)/2 : 0;
	var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no';
	var popup = window.open(url,winName,windowprops);
	// opener allows popup windows to communicate with its owner (the window from which it came)
	// please review http://www.webreference.com/js/tutorial1/opener.html for more information on opener
	if (popup.opener == null) { 	// check if opener property exists
		popup.opener = self; 		// define opener property
	}
	popup.focus();
}

function openVideo(url,winName,w,h) {
// parameters:	url = URL of the popup window
// 				winName = window name
// 				w = width
// 				h = height
	leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	topPosition = (screen.height) ? (screen.height-h)/2 : 0;
	var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no';
	document.videoWin =window.open(url,winName,windowprops);
	// opener allows popup windows to communicate with its owner (the window from which it came)
	// please review http://www.webreference.com/js/tutorial1/opener.html for more information on opener
	//document.videoWin.focus();
}

function openPic(url,winName,w,h) {
// parameters:	url = URL of the popup window
// 				winName = window name
// 				w = width
// 				h = height
	leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	topPosition = (screen.height) ? (screen.height-h)/2 : 0;
	var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no';
	var popup = window.open('',winName,windowprops);
	// opener allows popup windows to communicate with its owner (the window from which it came)
	// please review http://www.webreference.com/js/tutorial1/opener.html for more information on opener
	content = '<HTML>';
	content += '<TITLE>WARRIORS OF HEAVEN AND EARTH</TITLE>';
	content += '</HEAD>';
	content += '<BODY MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0" BGCOLOR="#000000">';
	content += '<table width="' + w + '" height="' + h + '" cellspacing="0" cellpadding="0" border="0"><tr>';
	content += '<td align="center" valign="middle"><img src="' + url + '"></td>';
	content += '</tr></table>';
	content += '</BODY></HTML>';
	popup.document.write(content);
	if (popup.opener == null) { 	// check if opener property exists
		popup.opener = self; 		// define opener property
	}
	popup.focus();
}

function openPic2(url,winName,w,h) {
// parameters:	url = URL of the popup window
// 				winName = window name
// 				w = width
// 				h = height
	leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	topPosition = (screen.height) ? (screen.height-h)/2 : 0;
	var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes';
	var popup = window.open('',winName,windowprops);
	// opener allows popup windows to communicate with its owner (the window from which it came)
	// please review http://www.webreference.com/js/tutorial1/opener.html for more information on opener
	content = '<HTML>';
	content += '<TITLE>WARRIORS OF HEAVEN AND EARTH</TITLE>';
	content += '</HEAD>';
	content += '<BODY MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0" BGCOLOR="#000000">';
	content += '<table width="' + w + '" height="' + h + '" cellspacing="0" cellpadding="0" border="0"><tr>';
	content += '<td align="center" valign="middle"><img src="' + url + '"></td>';
	content += '</tr></table>';
	content += '</BODY></HTML>';
	popup.document.write(content);
	if (popup.opener == null) { 	// check if opener property exists
		popup.opener = self; 		// define opener property
	}
	popup.focus();
}

function openFlash(url,w,h) {
// parameters:	url = URL of the popup window
// 				w = width
// 				h = height
	leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	topPosition = (screen.height) ? (screen.height-h)/2 : 0;
	var flashprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no';
	var popups = window.open(url,"MusicWindow",flashprops);
	popups.focus();
}

function imgOrg() {
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function imgShow() {
  var i,j=0,x,a=imgShow.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

	function getStoryDrop(){
		if(document.all&&!document.getElementById){
				var dleft=document.all["storyDIV"].offsetLeft;
				document.all["storySubNav"].style.left=dleft;
				document.all["storySubNav"].style.top=92;

		}else if(document.layers){
				var dleft=document.layers["storyDIV"].pageX;
				document.layers["storySubNav"].pageX=dleft;
				document.layers["storySubNav"].pageY=92;
		}else if(document.getElementById){
				var dleft=document.getElementById("storyDIV").offsetLeft;
				document.getElementById("storySubNav").style.left=dleft;
				document.getElementById("storySubNav").style.top=92;		
		}
	}
	function getMakingDrop(){
		if(document.all&&!document.getElementById){
				var dleft=document.all["makingDIV"].offsetLeft;
				document.all["makingSubNav"].style.left=dleft;
				document.all["makingSubNav"].style.top=92;

		}else if(document.layers){
				var dleft=document.layers["makingDIV"].pageX;
				document.layers["makingSubNav"].pageX=dleft+5;
				document.layers["makingSubNav"].pageY=92;
		}else if(document.getElementById){
				var dleft=document.getElementById("makingDIV").offsetLeft;
				document.getElementById("makingSubNav").style.left=dleft+5;
				document.getElementById("makingSubNav").style.top=92;		
		}
	}	
	function getDownDrop(){
		var dleft;
		if(document.all&&!document.getElementById){
				dleft=document.all["downDIV"].offsetLeft;
				document.all["downSubNav"].style.left=dleft;
				document.all["downSubNav"].style.top=92;

		}else if(document.layers){
				dleft=document.layers["downDIV"].pageX;
				document.layers["downSubNav"].pageX=dleft+13;
				document.layers["downSubNav"].pageY=92;
		}else if(document.documentElement){
				dleft=document.getElementById("downDIV").offsetLeft;
				document.getElementById("downSubNav").style.left=dleft+2;
				document.getElementById("downSubNav").style.top=92;		
		}
	}		

function instead(sName,sml,i){
	var img="../images/im_gallery"+i+".jpg";
	if(document.images){
        if (pubImg !=0){
            var last = "n_galleryicon"+pubImg;
            if (sml != last) document[last].src=gsPath + "n_galleryicon"+ pubImg + "_off.gif";
        }
        document[sml].src=gsPath + sml + "_on.gif";
        pubImg=i;
        document[sName].src=img;
		document["num"].src=gsPath+"im_num"+pubImg+".gif";
	}
}

//-->