/*****************************************************************************

This file contains JavaScript functions for sitewide deployment at:

http://www.pilsenscreens.com/

All script and functions were hand coded by Rodger D. Kurth.
All script and functions contained herein remain the joint property
of Rodger D. Kurth and Pilsen Screens, Chicago, IL.

The script and functions contained herein are intended for sitewide use.
The file manage.js is loaded into the browser upon first entering the site.
This makes the programs accessible almost instantly from the cache of the
browser upon deployment within subsequent pages.

All script is broken down into seperate functions in order to minimize
required RAM, CPU, and Program resources. i.e.:The browser will only run them
when called, thus creating a high level of control over these technical issues
in the hands of the webmaster.

FUNCTION BY FUNCTION:

ShowWindow() is a simple 'pop up' window creator. Takes the document name, 
width of new window, and height of new window as its arguments for on board
customization of any desired pop up window. Note that any links that use this
should be left intact as live HTML links. Use a return value of FALSE to allow
the ShowWindow(uri,winWidth,winHeight); function to run without activating the
HTML link. The working link will accomodate all of our friends who do not run
JavaScript at their browser, either by choice of lack of knowledge.

*****************************************************************************/
var newWindow=null;
var picWindow=null;
var advertisement=null;
var bName=navigator.appName;
var bVer=navigator.appVersion;
var vFinal=parseInt(bVer,10);
var marqueeLayer='intro_banner';

var docObj
var styleObj

function serveAd(){

	adWindow=window.open('release.html','adWin','toolbar=no,scrollbars=yes,location=no,resizable=yes,width=440,height=530,top=0');
	adWindow.focus();
}

window.defaultStatus='Welcome to Pilsen Screens!';

if ((bName=="Netscape") && (vFinal>=5)){

	docObj="top.top_frame.document.getElementById('"
	styleObj="').style"
}

else if ((bName=="Netscape") && (vFinal<5)){

	docObj="top.top_frame.document.layers['"
	styleObj="']"
}

else {

	docObj="top.top_frame.document.all."
	styleObj=".style"
}

function showIntro(onElem,offElem){
	nowShowing=eval(docObj+onElem+styleObj+".visibility='visible'");
	nowHidden=eval(docObj+offElem+styleObj+".visibility='hidden'");
	marqueeLayer=onElem;
}

function ShowWindow(uri,winWidth,winHeight) {

	newWindow = window.open(uri, 'showWin', 'toolbar=no,scrollbars=yes,location=no,resizable=yes,width='+winWidth+',height='+winHeight+',top=0')

	if(newWindow)newWindow.focus();newWindow.resizeTo(winWidth+10,winHeight+30);top.newWindow=true;
}

function closeWindow () {

	if (newWindow && !newWindow.closed) {
	
		newWindow.close();
	
	}

}

function setCloser() {

	document.write('<a href="JavaScript:Void(\'\');" onMouseOver="window.status=\'Close New Window\';return true;" onMouseOut="setStat();" onClick="closeWindow();return false;">Close Information Window</a>');
	
}
	

function ShowPix(uri,winWidth,winHeight){

	picWindow = window.open(uri, 'picWin', 'toolbar=no,scrollbars=no,location=no,resizable=yes,width='+winWidth+',height='+winHeight);
	if(picWindow){
	picWindow.focus();
	picWindow.resizeTo((winWidth+10),(winHeight+30));
	picWindow.src=uri;
	picWindow=true;
	}

}

function getMural() {

	muralWin = window.open('pritsker/index.html','theMural','toolbar=yes,location=yes,status=yes,scrollbars=yes,resizable=yes,width=600,height=500,top=20')

}

function adWindow(winWidth,winHeight){
advertisement = window.open('', 'picWin', 'toolbar=no,scrollbars=no,location=no,resizable=yes,width='+winWidth+',height='+winHeight+',top=0');
if(advertisement){


	advertisement.document.open();
	advertisement.document.writeln('<html><head><title>Buy Today</title></head><body bgcolor="#FFFFFF">');
	advertisement.document.writeln('<center>You may call us at 312-829-2746<br>or contact Anne Farley Gaines via email at<br>gainesart@aol.com<br><a href="JavaScript:window.close();">Close Window</a></center>');
	advertisement.document.writeln('</body></html>');
	advertisement.document.close();
	advertisement.focus();
	}
	

}

function exitFunc(){
	if(newWindow){
		newWindow.close();
	}
	
	if(picWindow){
		picWin.close();
	}
}

function reSet(){
	if (marqueeLayer!='intro_banner'){	
	nowShowing=eval(docObj+'intro_banner'+styleObj+".visibility='visible'");
	nowHidden=eval(docObj+marqueeLayer+styleObj+".visibility='hidden'");	
	}
}

