old_screen = new Object();
old_screen.width = screen.width;
old_screen.height = screen.height;
function go_t(url){
		window.location.href=url;	
}
function is_child_of(parent,child){
	if(parent&&parent.childNodes.length>0){
		if(parent.hasChildNodes()){
			for(var i=0;i<parent.childNodes.length;i++){
				if(parent.childNodes[i]==child){
					return true;	
				}
				if(parent.childNodes[i].hasChildNodes()){
					if(is_child_of(parent.childNodes[i],child)){
						return true	
					}
				}	
			}
		}
	}
	return false;	
}
function build_title(){
	var table,r1;
	table = document.getElementById("maintable");
	r1 = table.rows[0];
	
	r1.cells[0].childNodes[0].style.top = table.offsetTop+21; 
	r1.cells[0].childNodes[0].style.left = table.offsetLeft+100;
	//alert(r1.cells[0].childNodes[0].style.left+" "+table.offsetLeft+" "+table.offsetLeft);	
}
function onresize(){
	if(screen.width != old_screen.width || screen.height != old_screen.height){
		build_content();
		build_title();
		old_screen.width = screen.width;
		old_screen.height = screen.height; 	
	}
			
}
function build_content(){
	var Main_cont;
	
	Main_cont = document.getElementById("Main_cont");
	table = document.getElementById("maintable");
	if(screen.width<=800){
		table.style.width=table.width="100%";
	}else if(screen.width>800 && screen.width<=1280){
		table.style.width=table.width="96%";	
	}
	html = document.getElementsByTagName("html");
	html = html[0];
	Main_cont.style.height = html.offsetHeight-table.rows[0].offsetHeight-(table.rows[1].cells[1].offsetHeight-Main_cont.offsetHeight+15)+"px";
	table.rows[1].cells[0].style.height = table.rows[1].cells[1].offsetHeight+"px";
	if(html.offsetWidth<Main_cont.offsetWidth+145){		
		Main_cont.parentNode.style.width = (html.offsetWidth-180)+"px";
		r1 = table.rows[0];		
		target_width = ((html.offsetWidth)-r1.cells[2].offsetWidth-r1.cells[4].offsetWidth)/2
		r1.cells[1].style.width = target_width+"px";
		r1.cells[3].style.width = target_width+"px";		
	}
	body = document.getElementsByTagName("body");
	body = body[0];
	if(body.scrollHeight>body.offsetHeight){
		Main_cont.parentNode.style.height = Main_cont.scrollHeight+45;
		Main_cont.style.overflow = "visible";
		Main_cont.style.height = "9%";
		
	}
}