function create_screen(page) {
	var newdiv = document.createElement("div");
	newdiv.setAttribute("id", "divloader");
	document.body.appendChild(newdiv);
	
	scrollbar(false);
	getContents(page, "divloader");
	scroll(0,0);
}

function remove_screen(divname) {
	var d = document.getElementById(divname);
	d.parentNode.removeChild(d);
	scrollbar(true);
}

function load_album(id) {
	var newdiv = document.createElement("div");
	newdiv.setAttribute("id", "divloader");
	
	appendto = document.getElementById("albumloader");
	appendto.appendChild(newdiv);
	
	swidth = get_sz("width");
	sheight = get_sz("height");
	getContents("/page/showalbum/" + id + "/" + swidth + "/" + sheight, "divloader");
	scrollbar(false);
}

function load_flvplayer(title, filename, currenttime) {
	var newdiv = document.createElement("div");
	newdiv.setAttribute("id", "divloader");
	document.body.appendChild(newdiv);
	
	getContents("/page/showflvplayer/" + title + "/" + filename + "/" + currenttime, "divloader");
}

function scrollbar(show)
{
	if(show == false) {
		document.body.style.overflow = "hidden";
		document.body.parentNode.style.overflow = "hidden";
	} else {
		//document.body.style.overflow = "auto";
		document.body.parentNode.style.overflow = "auto";
	}
}

function get_sz(verhor) {
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth;
	  winH = window.innerHeight;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.body.offsetWidth;
	  winH = document.body.offsetHeight;
	 }
	}
	
	if(verhor == "width") { return winW; } else { return winH; }
}