function popUp(url, theWidth, theHeight) 
{
	var winHeight;
	
	if (theHeight == "screen"){
		winHeight = (screen.availHeight-250);
		if (winHeight == "")
			winHeight = 450;
	}
	else
		winHeight = theHeight;
		
	if (theWidth == "screen"){
		winWidth = (screen.availWidth-300);
		if (winWidth == "")
			winWidth = 650;
	}
	else
		winWidth = theWidth;
	
	var windowname= ("window" + Math.floor(Math.random()*15000));
	var widgets = 'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes, resizable=no,width=' + winWidth + ',height=' + winHeight + ', top=0, screeny=0';
	popupWin = window.open (url,windowname,widgets);
	// move windows so that windows dont perfectly hide old ones.
	popupWin.moveBy(Math.round((Math.random()*25)+1), Math.round((Math.random()*25)+1));
	popupWin.focus();
}


function popUp2(url, theWidth, theHeight) 
{
	var winHeight;
	
	if (theHeight == "screen"){
		
		winHeight = (screen.availHeight-250);
		if (winHeight == ""){
			winHeight = 450;
			
		}
		
	}
	else{
		winHeight = theHeight;
	}
		
	if (theWidth == "screen"){
		winWidth = (screen.availWidth-300);
		if (winWidth == "")
			winWidth = 650;
	}
	else
		winWidth = theWidth;
	
	var windowname= ("window" + Math.floor(Math.random()*15000));
	var widgets = 'toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes, resizable=yes,width=' + winWidth + ',height=' + winHeight + ', top=0, screeny=0';
	popupWin = window.open (url,windowname,widgets);
	popupWin.focus();
}

function makeUnderline(ID1, ID2, status){
	
	    element = document.getElementById(ID1);			
	    element.style.textDecoration = (status)?"underline":"none";	
		
		element = document.getElementById(ID2);			
	    element.style.textDecoration = (status)?"underline":"none";			
}
