//psr.js
// GLOBAL VARS
self.status = 'Please Wait...';
var m_sModDate='';

// IMAGE PRELOAD FOR IMAGES COMMON TO ALL PAGES
if(document.images){
	onimage = new Image();
	onimage.src = "./images/banner.jpg";
	onimage = new Image();
	onimage.src = "./images/bgnavpanel.jpg";
	onimage = new Image();
	onimage.src = "./images/spacer.gif";
	onimage = new Image();
	onimage.src = "./images/navtop.png";
	onimage = new Image();
	onimage.src = "./images/crcards2.gif";	
}

function findCurPageName(){
	var url=window.location.href;
	var lastSlash = url.lastIndexOf("/");
	var curPageName = url.substring(lastSlash+1,url.length);
	var dot = curPageName.indexOf(".");
	curPagePrefix = curPageName.substring(0,dot);
	return curPageName;
} // End findCurPageName

function doSideBarLinks(){
	var pLine='';
	pLine+='<p style="fontsize:120%;color:#fff203;margin-left:30px;"><br/><br/>Find my Original<br/>CD on<br/>';
	pLine+='<a href="http://itunes.apple.com/us/album/pills/id416846674?i=416846780&amp;ign-mpt=uo%3D4" target= "_blank"><img src="./images/logo_itunes.jpg" style="float:right;margin-right:5px;" width="67" height="94" border="0" alt="Steve\'s songs on ITunes" /></a>';

	pLine+='<br/><br/><br/><br/><br/>'; 
	pLine+='<a href="http://www.amazon.com/Tunnel-Vision/dp/B004KVIFYS/ref=sr_1_9?ie=UTF8&amp;s=dmusic&amp;qid=1296090204&amp;sr=8-9" target= "_blank"><img src="./images/logo_amazon.jpg" style="float:right;margin-right:5px;" width="94" height="94" border="0" alt="Steve\'s songs on Amazon" /></a>';
	pLine+='<br/><br/>'; 
//	pLine+='<a href="http://www.shockhound.com/albums/772553-steve-definis-mp3s-tunnel-vision" target= "_blank"><img src="./images/logo_shockhound.jpg" style="float:right;margin-right:5px;" width="130" height="26" border="0" alt="Steve\'s songs on shockhound" /></a><br />';

	pLine+='</p>';
	document.write(pLine);
}	// End doSideBarLinks
function doTopButton(){
	var pLine = '';
	pLine += '<br />';
	pLine += '<div class="linkline">';
	pLine += '<a href="#"><img src="./images/navtop.png" width="49" height="24" border="0" style="border:#000000 1px inset;" alt="Top of Page" title="Top of Page" /></a></div>';
	document.write(pLine);
} // End doTopButton

function doBusinessHours(){
	var pLine = '<br />';
	pLine += '<div class="linkline">';
  pLine += '<p style="text-align:center;"> Open Daily 7:30am - 6:00pm<br />';
  pLine += 'Phone: 973-827-8881&nbsp;&nbsp;&nbsp;&nbsp;Fax: 973-827-9772</p></div>';
  document.write(pLine);
}	// End doBusinessHours

function doLinkLine(){
	var pLine = '';
	pLine += '<div class="linkline">';
	pLine += '<br/>';
	pLine +='<img src="./images/crcards2.gif" style="border:#999999 2px outset;" width="99" height="30" alt="We accept Visa and Mastercard" longdesc="Images of Visa and Mastercard" /><br /><br />';
	pLine += '<a href="index.html">Home</a> | ';
	pLine += '<a href="services.html">Services</a> | ';
	pLine += '<a href="about.html">About Us</a> | ';
	pLine += '<a href="directions.html">Directions</a> | ';
	pLine += '<a href="contact.html">Contact</a> | ';
	pLine += '<a href="links.html">Resources</a> | ';
	pLine += '<a href="gallery.html">Gallery</a> | ';
	pLine +='<a href="sitemap.html">SiteMap</a></p>';
	pLine += '<br/></div>';
	document.write(pLine);
} // End doLinkLine

function getCompEnv(){
	var screenRes = '';
	var cmptrEnv = 'U.A.=' + navigator.userAgent + ', OS=' + window.navigator.platform + ', CPU=' + window.navigator.cpuClass;
	if ( window.screen ){
		screenRes += window.screen.width; 
		screenRes += 'x'; 
		screenRes += window.screen.height;
	}else{
		screenRes = 'Unknown';
	}
	cmptrEnv += ', Resolution=';
	cmptrEnv += screenRes;
	return cmptrEnv;
} // End getCompEnv

function doFootingA(userAgent)
{
	var pLine = '';
	pLine += '<br/>';
	pLine += '<div class="footerA">';
	pLine += 'For best viewing, always use the latest browsers.<br>';
	pLine += '<a class="footerA" href="http://www.upsdell.com/BrowserNews/find.htm" target="_blank">Click here for a FREE browser Upgrade</a>.<br>';
	pLine += 'Please report any problems viewing this site to the Webmaster.';	
	document.write(pLine);
}

function doFooter(){
	var pLine = '<div id="footing">';
	pLine +='<table width="100%" valign="top" cellpadding="0" cellspacing="0" border="0" summary="page footing">';
//	pLine +='<tr><td align="left" valign="top"><img src="./images/spacer.gif" border="0" style="margin-right:5px;" alt="" /></td>';
	pLine +='<tr>';
	pLine +='<td class="footer" align="left" valign="top">&copy;&nbsp;' + g_COPYRIGHT + '.&nbsp;&nbsp;All rights reserved.';
	pLine +='<br />Please report problems viewing this site as ';
	pLine +='<a class="footer" href="mailto:'+g_WEBMASTERMAILTO + '?subject=Re: Website ' + g_CLIENTURL + ', Page=' + findCurPageName() + ', ';
	pLine +=getCompEnv();
	pLine +='">Comments to Webmaster</a><br />';
	var sLine= 'Site last modified ' + g_sLASTUPDATE + ', Reviewed ' + g_sLASTREVIEW + '&nbsp;by ' +
		'<a class="footer" href="' + g_WEBMASTERURL + '" target="_blank">' + g_WEBMASTERNM + '</a>&nbsp;' + 
		'<br/><br/>&nbsp; </td></tr></table></div>';
	pLine += sLine;
	document.write(pLine);
}	//End doFooter

function openRemote(url,winWidth,winHeight)
{
	var winParms = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=" + winWidth + ",height=" + winHeight;
	var remote = window.open(url,"SDMREMOTE",winParms);
	if(remote.opener == null)
		remote,opener = window;
}
self.status='';
