//
// Change image on mouse over.
//


function turnOn(imageName) {
  if (document.images) {
    document[imageName].src = eval(imageName + "_on.src");
  }
}

function turnOff(imageName) {
  if (document.images) {
    document[imageName].src = eval(imageName + "_off.src");
  }
}


var mwinLogin;
function login() {
  var pstrURL;
  
  pstrURL = "/lounge/elk_login.jsp?LoginContinueURL=elk_index.jsp";
  
  if (navigator.appName == 'Microsoft Internet Explorer') 
    mwinLogin = window.open(pstrURL,"Login", "directories=no, location=no, scrollbars=no, menubar=no, resizable=yes, status=no, toolbar=no, height=250, width=350, top=100, left=75");
  else
    mwinLogin = window.open(pstrURL,'Login','resizable,scrollbars=no,height=250,width=350');
}




//
// Open the portfolio samples.
//

function opensample(pintIndex){

window.focus();	

parent.content.location.href="elk_portfolio_txt.jsp?Index=" + pintIndex;
parent.anigif.location.href="elk_portfolio_img.jsp?Index=" + pintIndex;



}

function loadnews(){
	var pstrstring = "";
	var pstrurl = "";
	var pintstart;
	var pstrpassedURL = document.location.href;

// Replace semi colon for NN4.

	re = /:/g;
	pstrpassedURL = pstrpassedURL.replace(re,"%3A");

	pintstart = pstrpassedURL.indexOf("?");
	if (pintstart != -1) {
		pintstart = pintstart + 1;
		pstrstring = pstrpassedURL.substr(pintstart);
		pstrurl = "elk_news.jsp?" + pstrstring;
		window.news.location.href = pstrurl;
	}
	else {
		window.news.location.href = "elk_news.jsp";	
	}
}



function openPopup(pstrpage) {
var pstrURL, pinttop, pintleft;
pstrURL="/elk_"+ pstrpage +".htm";
pinttop = (screen.availHeight/2-125);
pintleft = (screen.availWidth/2-300);
if (navigator.appName == 'Microsoft Internet Explorer') 
	{window.open(pstrURL,"popup", "directories=no, location=no, menubar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no, height=350, width=600,top="+pinttop+",left="+pintleft);}
else
	{popupwindow=window.open(pstrURL,'popup','scrollbars,resizable,height=350,width=600');}
}

function openpopupGDM(pstrpage, pstrURL) {
var pstrURL, pinttop, pintleft;

pinttop = (screen.availHeight/2-185);
pintleft = (screen.availWidth/2-255);
if (navigator.appName == 'Microsoft Internet Explorer') 
	{window.open(pstrURL,"popup", "directories=no, location=no, menubar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no, height=450, width=610,top="+pinttop+",left="+pintleft);}
else
	{popupwindow=window.open(pstrURL,'popup','scrollbars,resizable,height=450,width=610');}
}



function goLogin(){
document.location.href=LoginURL;
}

function showItem(pstrId){
	document.getElementById(pstrId).style.display = '';	
}	

function hideItem(pstrId){
	document.getElementById(pstrId).style.display = 'none';	
}	

function setItem(pstrId, pstrNewValue){
	document.getElementById(pstrId).innerHTML = pstrNewValue;	
}