var ie5 = (document.getElementById&&document.all); 
var nn6 = (document.getElementById&&!document.all); 

function opendetails(url){
	//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 = "jamnation_song_details" + getDateTimeStamp();
	var decorations = "no";
	var width = 560;
	var height = 735;
	var str;
	str += "toolbar=" + decorations; 
	str += ", location=" + decorations; 
	str += ", directories=" + decorations; 
	str += ", status=" + decorations; 
	//str += ", scrollbars=" + decorations; 
	//str += ", resizeable=" + decorations; 
	str += ", copyhistory=" + decorations; 
	str += ", width=" + width;
	str += ", height=" + height;
	
	if (ie5) {
		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 openlyrics(url){
	//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 = "jamnation_song_lyrics" + getDateTimeStamp();
	var decorations = "no";
	var width = 800;
	var height = 800;
	var str;
	str += "toolbar=no"; 
	str += ", location=no"; 
	str += ", scrollbars=yes"; 
	str += ", resizeable=yes";
	str += ", width=" + width;
	str += ", height=" + height;
	
	window.open(url, name, str);
	return false;
 }
 
function newwindow(url){
	var name = "new_window" //+ getDateTimeStamp();
	window.open(url, name);
	return false;
}
 
function printme(){
	window.print();
	return false;
}
 
function getDateStamp (){
	var now = new Date();
	var year = now.getYear();
	var month = now.getMonth()+1;
	var day = now.getDate();
//	var hours = now.getHours();
//	var minutes = now.getMinutes();
//	var seconds = now.getSeconds();
	var stamp = year;
	stamp += ((month < 10) ? "0" : "") + month;
	stamp += ((day < 10) ? "0" : "") + day;
//	timeValue += ((hours < 10) ? "0" : "") + hours;
//	timeValue += ((minutes < 10) ? "0" : "") + minutes;
//	timeValue += ((seconds < 10) ? "0" : "") + seconds;
	return timeStamp
}
 
function getDateTimeStamp (){
	var now = new Date();
	var year = now.getYear();
	var month = now.getMonth()+1;
	var day = now.getDate();
	var hours = now.getHours();
	var minutes = now.getMinutes();
	var seconds = now.getSeconds();
	var stamp = year;
	stamp += ((month < 10) ? "0" : "") + month;
	stamp += ((day < 10) ? "0" : "") + day;
	stamp += ((hours < 10) ? "0" : "") + hours;
	stamp += ((minutes < 10) ? "0" : "") + minutes;
	stamp += ((seconds < 10) ? "0" : "") + seconds;
	return stamp;
}

