// JavaScript Document
// 初始化背景色 copyright by sunnyswim@gmail.com
$(document).ready(function(){forbidcopy();})
//随机获得背景
function getbgcolor(){
	function GetRandomNum(Min,Max){//随机数范围
        var Range = Max - Min;
        var Rand = Math.random();
        return(Min + Math.round(Rand * Range));
		}
		var tempArray = new Array();//色彩数组
		tempArray [1] ="#B7EFFB";
		tempArray [2] ="#D7FFD7";
		tempArray [3] ="#FFDDDD";
		tempArray [4] ="#FFFFD0";
		tempArray [5] ="#FFBFBF";
		tempArray [6] ="#FFFFCC";
		tempArray [7] ="#fff";
		$("#bgcolors").css("background",tempArray[GetRandomNum(1,7)]);
	}
//无限下拉菜单效果	
	function menuList(){
	$('.subMenu li').hover(function(){
		
		$(this).children('ul').stop(true,true).show('slow');	
		
	},function(){
		$(this).children('ul').stop(true,true).hide('slow');
	});
	
	$('.subMenu li').hover(function(){
		$(this).children('div').stop(true,true).show('slow');
	},function(){
		$(this).children('div').stop(true,true).hide('slow');
	});
}
//禁止copy


function forbidcopy(){
		function jannick() {
return false }
function jannick1() {
if (event.button==2) {return false }}
function CtrlKeyDown(){
if (event.ctrlKey) {return false }}
document.onkeydown=CtrlKeyDown;
document.onselectstart=jannick;
document.onmousedown=jannick1;
}


function stop(){
return false;
}
document.oncontextmenu=stop;


function killerrors() { return true; }
window.onerror = killerrors; 

