var ajax_url="index.php?rt=ajax/result/";
var popup_url='#';

function image_src(src,url){
	$('#large_image').attr("src",src);
	$('#popup_url').attr("href",url);
	popup_url=url;
	$('#image_view').show();
	$('#text_view').hide();
	
}
function clickIE() {
	if (document.all) {
	return false;}
}
function clickNS(e) {
	if (document.layers||(document.getElementById&&!document.all)) {
		if (e.which==2||e.which==3) {
			return false;
		}
	}
}

if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
}else{
	document.onmouseup=clickNS;document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false"); 

function disableViewSource(evt)
{
	
	var disabled = {a:0, c:0, x:0, n:0, u:0};
	var ctrlMod = (window.event)? window.event.ctrlKey : evt.ctrlKey;
	var altMod = (window.event)? window.event.altKey : evt.altKey;
	var key = (window.event)? window.event.keyCode : evt.which;
	key = String.fromCharCode(key).toLowerCase();
	
	if (altMod){
		window.location.reload( false );
		window.blur();
	}
	return (ctrlMod && (key in disabled))? false : true;
} 


$(document).ready(function(){
	$("#search").click(function(){
		$("#searchFrm").submit();
	});
	$("#popup_url").click(function(){
		popup();
	});
	

	$("#menu ul li").hover(function(){
	$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(268); 
	},function(){
	$(this).find('ul:first').css({visibility: "hidden"});
	});

	

});


function go_page(p){
	$('#page').val("page-" + p);
	document.search.submit();
}

function popup(){
	window.open( popup_url, "myWindow","status = 1, height = 840, width = 860,");
}



