var popUpWin=0;
function popUpWindow(URLStr, left, top){
	if(popUpWin){
	    if(!popUpWin.closed){
			popUpWin.close();
		}
    }
    popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=yes,resizable=yes,copyhistory=yes,width=500,height=350,left='+left+', top='+top+',screenX='+left+',screenY='+top);
}
function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=300,height=300,left = 570,top = 300');");
}
function popUpMusic(URL) {
	day = new Date();
	id = day.getTime();
	width = 535;
	height = 425;
	x = parseInt(window.screen.width) / 2 - (width/2);  
	y = parseInt(window.screen.height) / 2 - (height/2);
	popUp = open(URL,'audioSample', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width='+width+',height='+height+',left='+x+',top='+y);
}
function popup_window( url, id, width, height )
{
   //extract the url parameters if any, and pass them to the called html
   var tempvar=document.location.toString(); // fetch the URL string
   var passedparams = tempvar.lastIndexOf("?");
   if(passedparams > -1)
	  url += tempvar.substring(passedparams);
  popup = window.open( url, id, 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=' + width + ',height=' + height + '' );
  popup.focus();
}