function closediv() {
	$jquery(".tabpage").each(function() {
		$jquery(this).css('display','none');
	});
	$jquery(".tabmenu a").each(function() {
		$jquery(this).removeAttr("class");	
	});
}

function searchbox_active() {
	$jquery("#searchbox").css("color","#000000");
	$jquery("#searchbox").val("");
}


function opendiv(id) {
	closediv();
	$jquery("#tabpage"+id).fadeIn(1000);
	$jquery("#tabmenu"+id).addClass('selected');
}

function hidediv(mit) {
	if(mit!="" && mit!="undefined") {
		if($jquery(mit).css('display')=='none') 
			$jquery(mit).css('display','');
		else
			$jquery(mit).css('display','none');
	}
}

/*
function hidediv(mit) {
	if(mit!="" && mit!="undefined") {
		if(mit.style.display=='none')
			mit.style.display='';
		else
			mit.style.display='none';
	}
}
*/
function menu_mouse_over(menutag,level) {

}

function menu_mouse_out(menutag,level) {

}

function floatdiv(url) {
	$jquery("body").append('<div style="background:#000000; text-align: center; height: 100%; opacity:0.5; left:0; position:absolute; top:0; z-index:1002" id="overlay"></div>');
	$jquery('#overlay').width($jquery("body").width());

	$jquery("body").append('<div style="padding:40px; height:100%; left:0; position:absolute; top:0; z-index:1003" id="overlaycont"><iframe style="border:5px solid #333333; background:#ffffff" id="overlayframe" src="'+url+'"></iframe></div>');
	$jquery('#overlayframe').width($jquery("body").width()-80);
	$jquery('#overlayframe').height($jquery(window).height()-80);
}

function init() {
	opendiv('1');
}

function windowresize() {

	if($jquery('#overlay')) {
		$jquery('#overlayframe').width($jquery("body").width()-80);
		$jquery('#overlayframe').height($jquery(window).height()-80);
	}
}

window.onresize=windowresize; 
