// JavaScript Document

	timeout =0; // Close window after __ number of seconds?
				// 0 = do not close, anything else = number of seconds
	siteURL = 'http://www.interlinkbooks.com/';
			
	function Start(URL, WIDTH, HEIGHT) {
		windowprops = "left=50,top=50,width=" + (WIDTH+50) + ",height=" + (HEIGHT+50);
		text = "<html><head><title>Preview</title></head><body bgcolor='white'";
		if (timeout != 0) text +=" onLoad=\"setTimeout('window.close()', " + timeout*1000 + ");\"";
		text += "><center><img src='" + URL + "'>";
		if (timeout != 0) 
			{text +="<br><font face='arial, helvetica' size='-1'>Preview closes after " + timeout + " seconds.</font>";}
		text += "</center></body></html>";
		preview = window.open("", "preview", windowprops);
		preview.document.open();
		preview.document.write(text);
		preview.document.close();
		}
		
	function RedirectToURL(url,absolute,active) { // if absolute=true, the address is given relative to the site's root: "/".
		if (active) {
			if (absolute)
				//url = 'http://www.interlinkbooks.com/' + url; // add the site url
				url = 'http://alberto-castros-computer.local/Interlink' + url; // add the site url
			if (top == self)
				self.location.href=url; // redirect to the frameset
			} // end if (active)
		} // end function
		
	function MM_jumpMenu(targ,selObj,restore){ //v3.0
	  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	  if (restore) selObj.selectedIndex=0;
	}
	
	function MM_findObj(n, d) { //v4.01
	  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 && d.getElementById) x=d.getElementById(n); return x;
	}
	
	function MM_jumpMenuGo(selName,targ,restore){ //v3.0
	  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
	}
	
	
	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	MM_reloadPage(true);