// JavaScript Document
function openLrgImg(imgName,caption,w,h) {
	w += 50;	//add margin around image
	h += 175;	//add margin around image
	var docStr = '';
	docStr += '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
	docStr +=  '<html>';
	docStr +=  '<head>';
	var titleStr = '<title>'+"Xylacat"+'</title>';
	docStr +=  titleStr;
	docStr +=  '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">';
	docStr +=  '<link href="xylacatstyles.css" rel="stylesheet" type="text/css">';
	docStr +=  '</head>';
	docStr +=  '<body>';
	docStr +=  '<div class="subwin">';
	docStr +=  '<p id="imagecaption">'+caption+'</p>';
	var imgStr = '<img src="images/'+imgName+'" border="0">';
	docStr +=  '<p>'+imgStr+'</p>';
	docStr +=  '<p align=center><a class="subwin" href="javascript:window.close();">close</a></p>';
	docStr +=  '<p>&nbsp;</p>'
	docStr +=  '</div>';
	docStr +=  '</body>';
	docStr +=  '</html>';

	//reduce window size if too wide for display
	if (w > screen.width)
	{ 
		w = screen.width;
		winArg = 'HEIGHT='+h+',WIDTH='+w+',left=0,dependent,scrollbars';
	}
	else
	{
		winArg = 'HEIGHT='+h+',WIDTH='+w+',dependent';
	}
	
	var lWin = window.open("","",winArg);
	lWin.focus();
	lWin.document.write(docStr);
	return true;

}

function reloadIndexTop()
{
	top.location.href = 'index.htm?'+backFrm;
/*	docStr = "";
	docStr += '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">';
	docStr += '<html>';
	docStr += '<head>';
	docStr += '<title>Rockin\' Hoarse Studios</title>';
	docStr += '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">';
	docStr += '<script src="rhscripts.js">';
	docStr += 'MM_reloadPage(true);';
	docStr += '</script>';
	docStr += '<link href="rockinhoarse.css" rel="stylesheet" type="text/css">';
	docStr += '</head>';
	docStr += '<frameset style="framebody" rows="156,*" cols="*" framespacing="0" frameborder="NO" border="0">';
	docStr += '<frame src="navbar.htm" name="topFrame" scrolling="NO" noresize >';
	docStr += '<frame src="contact.htm" name="mainFrame" noresize>';
	docStr += '</frameset>';
	docStr += '<noframes><body>';
	docStr += '</body></noframes>';
	docStr += '</html>';
	alert(docStr);
	self.document.write(docStr);
	return;
*/
}
function openImgInWin(imgName,backFrm) {
	var docStr = '';
	docStr += '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
	docStr +=  '<html>';
	docStr +=  '<head>';
	var titleStr = '<title>'+"Rockin' Hoarse Studios"+'</title>';
	docStr +=  titleStr;
	docStr +=  '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">';
	docStr +=  '<link href="rockinhoarse.css" rel="stylesheet" type="text/css">';
	docStr +=  '<script src="rhscripts.js">';
	docStr +=  '</script>';
	docStr +=  '<script>';
	docStr +=  'var backFrm = "'+backFrm+'";';
	docStr +=  '</script>';
	docStr +=  '</head>';
	docStr +=  '<body>';
	docStr +=  '<div class="subwin">';
	var imgStr = '<img src="'+imgName+'" border="0">';
	docStr +=  '<p align=center><a href="javascript:reloadParent();">back</a></p>';
	docStr +=  '<p>'+imgStr+'</p>';
	docStr +=  '<p>&nbsp;</p>'
	docStr +=  '</div>';
	docStr +=  '</body>';
	docStr +=  '</html>';

//	top.document.write(docStr);
	parent.frames[1].document.write(docStr);
	return;
}
function openSub(imgName) {
	e1 = document.getElementById('subwinimg');
	e1.src = 'images/'+imgName;
}
function reloadParent() {
	history.back();
}
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	return;
  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();
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
function swapBkImg(imgName) {
	e1 = document.getElementById('Layer2');
	e1.style.backgroundImage = "url("+imgName+")";
	e1.style.color = '#666666';
	return true;
}
function swapBkImgRestore() {
	e1 = document.getElementById('Layer2');
	e1.style.backgroundImage = "none";
	e1.style.color = '#FFFFFF';
	return true;
}
function popupLayerOn(imgName) {
	popup = document.getElementById('popupLyr');
	popupimg = document.getElementById('popupImgId');
	outer = document.getElementById('outerlayerid');
	sidebar = document.getElementById('sidebarid');
	maindoc = document.getElementById('maindocid');
	maindoc.style.display = 'none';
	sidebar.style.display = 'none';
//	popup.style.backgroundImage = "url("+imgName+")";
//	popup.style.backgroundRepeat = "no-repeat";
	popup.style.display = "block";
	popupimg.src = imgName;
	return true;
}
function popupLayerOff() {
	popup = document.getElementById('popupLyr');
	sidebar = document.getElementById('sidebarid');
	maindoc = document.getElementById('maindocid');
	popup.style.display = 'none';
	maindoc.style.display = 'block';
	sidebar.style.display = 'block';
	return true;
}
function writeFrameset() {
// for testing only
var passed     = location.search ? unescape(location.search.substring(1)) + '&' : '';
var startPage  = passed ? passed.substring(0,passed.indexOf('&')) : 'home.htm';

if (top != self)
    top.location.href = location.href;
else {

    document.write('<frameset rows="156,*" cols="*" framespacing="0" frameborder="NO" border="0">');
    document.write('  <frame src="navbar.htm" name="topFrame" scrolling="NO" noresize >');
    document.write('  <frame src="' + startPage + '" name="mainFrame" noresize>');
    document.write('<\/frameset>');
}
}
