//************************************************************
$(function(){
	$("a").focus(function(){this.blur()});
	//$(document).bind('contextmenu',function(){return false;});
	//$(document).bind('selectstart',function(){return false;});
});
//************************************************************
function Redirect(key, val){
	window.location.href = $.query.set(key, val).toString();
}
//************************************************************
$(function(){
	if ($("#page_1").length>0){$("#html_1").html($("#page_1").html())}
	if ($("#page_2").length>0){$("#html_2").html($("#page_2").html())}
	if ($("#page_3").length>0){$("#html_3").html($("#page_3").html())}
	if ($("#page_4").length>0){$("#html_4").html($("#page_4").html())}
	if ($("#pro_arr").length>0){$("#pro_html").html($("#pro_arr").html())}
});
//************************************************************
$(function(){
	$("#navigation li").each(function($i){
		$("#navigation li:eq(0)").attr('class',"open");
		$("#navigation li li:eq(0)").attr('class',"open");
	});
	$("#navigation").treeview({
		animated: "fast",
		collapsed: true,
		unique: true,
		persist: "cookie",
		cookieId: "treeview-black",
		toggle: function() {
			window.console && console.log("%o was toggled", this);
		}
	});
});
//************************************************************
$(function(){
	if ($(".jqzoom").length>0){
		var options = {
			zoomWidth: 240,
			zoomHeight: 180,
			xOffset: 10,
			yOffset: 0,
			position: "right"
		};
		$('.jqzoom').jqzoom(options);
	}
});
//************************************************************
$(function(){
	if ($("#marqueediv").length>0){
		new Marquee("marqueediv",2,1,420,110,30,0,0)
	}
});
//************************************************************
function flash(FlashSrc,FlashWidth,FlashHeight){
	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+FlashWidth+"' height='"+FlashHeight+"' align='middle'>"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+FlashSrc+"' />"+
	"<param name='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	"<param name='wmode' value='transparent' />"+
	"<embed src=\""+FlashSrc+"\" quality=\"high\" width=\""+FlashWidth+"\" height=\""+FlashHeight+"\" wmode=\"transparent\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></embed>"+
	"</object>";
	document.write(flashStr);
}
//************************************************************
function Validate(o,r){
	reg = r;
	if(!reg.test($('#'+o).val())){
		return false;
	}else{
		return true;
	}	
}
$(function(){
	$("#search").submit(function(){
		if ($("#keywords").val()=='' || $("#keywords").val()=='Please enter a keyword'){
			alert("Please enter a keyword");
			return false;
		}
	})
})
//************************************************************
