function SetCwinHeight(){
	var iframeid=document.getElementById("mainContent");
	if (document.getElementById){
		if (iframeid && !window.opera){
			if (iframeid.contentDocument && iframeid.contentDocument.body.offsetHeight){
			 iframeid.height = iframeid.contentDocument.body.offsetHeight;
			}else if(iframeid.Document && iframeid.Document.body.scrollHeight){
			 iframeid.height = iframeid.Document.body.scrollHeight;
			}
		}
	}
}
$(function(){
	$("#content_left a").click(function(){
		var text = $(this).text();
		$("#navmore").html("&nbsp;&gt;&nbsp;"+text);
		
		$(".over").removeClass("over");
		$(this).addClass("over");
		$(this).blur();
	});
	$("#nav a:first-child").click(function(){
		$("#navmore").html("");
	});
});
var dia = null;
function openFrame(url,text){
	dia = new Dialog("dia","div_mask","50","div_Title","div_dialog","","","",true,"","div_content");
	dia.SetCloseID("div_closeMask");
	dia.SetMoveID("div_Title");
	dia.CreateDialogDiv();
	$("#alertFrame").attr("src",url);
	$("#div_Title h2").html(text);
}

var goto_top_type = -1;
var goto_top_itv = 0;

function goto_top_timer()
{
var y = goto_top_type == 1 ? document.documentElement.scrollTop : document.body.scrollTop;
var moveby = 15;

y -= Math.ceil(y * moveby / 100);
if (y < 0) {
y = 0;
}

if (goto_top_type == 1) {
document.documentElement.scrollTop = y;
}
else {
document.body.scrollTop = y;
}

if (y == 0) {
clearInterval(goto_top_itv);
goto_top_itv = 0;
}
}

function goto_top()
{
if (goto_top_itv == 0) {
if (document.documentElement && document.documentElement.scrollTop) {
goto_top_type = 1;
}
else if (document.body && document.body.scrollTop) {
goto_top_type = 2;
}
else {
goto_top_type = 0;
}

if (goto_top_type > 0) {
goto_top_itv = setInterval('goto_top_timer()', 50);
}
}
}

try { 
	document.execCommand('BackgroundImageCache', false, true); 
} catch(e) {}
window.onerror = function(){return true;}
