var ie5 = (document.getElementById&&document.all); 
var nn6 = (document.getElementById&&!document.all); 

/////////////////////////////////////////////////////////////////////////////
function openwindow(url, width, height)
	{
	//url = the url to navigate to
	//name = the name of the window to create
	//width, height = width and height of the window
	//ie = empty string or url to ie request redirect
	//var name = "mfpsongdetails" + getTimeString();
	var name = "gallery";
	var decorations = "no";
	//var width = 560;
	//var height = 710;
	var str;
	str += "toolbar=" + decorations; 
	str += ", location=" + decorations; 
	str += ", directories=" + decorations; 
	str += ", status=" + decorations; 
	str += ", scrollbars=" + decorations; 
	str += ", resizeable=" + decorations; 
	str += ", copyhistory=" + decorations; 
	
	if(width != ""){
		str += ", width=" + width;
		str += ", height=" + height;
	}
	
	if (ie5 && width != "") {
		var screenwidth = screen.availWidth - 10;
		var screenheight = screen.availHeight - 30;
	 
		var left = (screenwidth - width) / 2;
		var top = (screenheight - height) / 2;
	
		str += ", left=" + left;
		str += ", top=" + top;
	} else {
	    str += ", left=100";
    	str += ", top=20";
	}
		
	window.open(url, name, str);
	return false;
 }
 
/////////////////////////////////////////////////////////////////////////////
function getTimeString (){
	var now = new Date();
	var month = now.getMonth()+1;
	var day = now.getDate();
	var year = now.getYear();
	var hours = now.getHours();
	var minutes = now.getMinutes();
	var seconds = now.getSeconds();
	var timeValue = year;
	timeValue += ((month < 10) ? "0" : "") + month;
	timeValue += ((day < 10) ? "0" : "") + day;
	timeValue += ((hours < 10) ? "0" : "") + hours;
	timeValue += ((minutes < 10) ? "0" : "") + minutes;
	timeValue += ((seconds < 10) ? "0" : "") + seconds;
	return timeValue
}

