
//default javascript functions

ns4 = (document.layers)? true:false;
ie4 = (document.all)? true:false;
domain = 'http://www.lunamusika.com/';


function loadContent(newPage){
	parent.contentFRM.document.location = newPage;
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function openNewWindow(URLtoOpen, windowName, windowFeatures) 
{
	newWindow=window.open(URLtoOpen, windowName, windowFeatures); 
}


function showPic(pic){
	var contentobj=document.getElementById? document.getElementById("bandPic"): document.all.bandPic;
	var image = '../media/photos/'+ pic;
	contentobj.innerHTML='<center>Loading image...</center>';
	contentobj.innerHTML='<center><img src="'+image+'">';
	
}

function ViewImage(ifile,ix,iy,ititle) {
	var win;
	var sWidth;
	var sHeight;
	var NS = (document.layers) ? 1 : 0;
	win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no");
	if (NS) {
	sWidth = win.innerWidth;
	sHeight = win.innerHeight;
	} else {
	sWidth = win.document.body.clientWidth;
	sHeight = win.document.body.clientHeight;
	}
	if(sWidth!=ix || sHeight!=iy) {
	win.close();
	setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
	return;
	}
	win.document.open();
	win.document.write("<html><head><title>"+ititle+"</title>");
	win.document.write("<link rel='stylesheet' type='text/css' href='Styles.css'>");
	win.document.write("</head><body>");
	win.document.write('<center><div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px;align:center">');
	win.document.write("<a href='JavaScript:this.close();'>");
	win.document.write("<img border='0' align='center' src="+ifile+"></div></center></body></html>");
	win.document.write("</a>");
	win.document.close();
}

function ViewWallpaper(ifile,ix,iy,ititle) {
	var win;
	var sWidth;
	var sHeight;
	var hgtPad = 55;
	var windHgt = iy + hgtPad;
	var NS = (document.layers) ? 1 : 0;
	var sInstructions = "";
	win = window.open("","imageviewer","width="+ix+",height="+windHgt+",menubar=no,toolbar=no");
	if (NS) {
	sWidth = win.innerWidth;
	sHeight = win.innerHeight;
	} else {
	sWidth = win.document.body.clientWidth;
	sHeight = win.document.body.clientHeight;
	}
	if(sWidth!=ix || sHeight!=iy + hgtPad) {
	win.close();
	setTimeout("ViewWallpaper('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
	return;
	}
	win.document.open();
	win.document.write("<html><head><title>"+ititle+"</title>");
	win.document.write("<link rel='stylesheet' type='text/css' href='../css/vos.css'>");
	win.document.write("</head><body>");
	win.document.write('<center><div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px;align:center;vertical-align:top">');
	win.document.write("<a href='JavaScript:this.close();'><b>Close Window</b></a>");
	win.document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
	win.document.write('<br>Right click image and choose <b>"Save Picture As..." </b> to download to your computer');
	win.document.write('<hr class="topMenu">');
	win.document.write("<img border='0' align='center' src="+ifile+"></div></center></body></html>");	
	win.document.close();
}


 function changePortholeTextOld(text) {
  if (ns4){
  	
	//window.top.document.getElementById("porthole").innerHTML = text;
  //}
	 // else if (ns4)  {
	   var lyr = window.top.document.layers["porthole"].document;
	   var lyr = window.top.document.porthole;
	   lyr.open();
	   lyr.write(text);
	   lyr.close(); 
  }else {
	window.top.document.all["porthole"].innerHTML = text;
  }
  
 }

function changePortholeText(text) {
  
	//window.top.document.all["porthole"].innerHTML = text;
 
 }
 

 
 function loadPortholeFrame(contentURL) {
	var iframeobj=document.getElementById? window.top.document.getElementById("portholeFRM") : window.top.document.all.portholeFRM
	
	if(ie4){
		if(window.top.document.frames['portholeFRM'].location.href == domain + contentURL)
			return;
	}
	//alert(contentURL);
	
	iframeobj.src = contentURL;
}


  
 