//头部切换按钮文件
var CMenu = function () {
	this.initialize.call(this, arguments);
};

CMenu.prototype = {
	
	initialize : function (arg) {
		var wc = this, div = wc.div = arg[0];
		wc.time = arg[1];
		wc.timer = 0;
		div.onmouseover = function () {
			wc.look(1);
		};
		
		div.onmouseout = function () {
			wc.look(0);
		};
	},
	
	show : function (a) {
		var wc = this, div = wc.div;
		wc.timer = 0;
		if(a==1){
			var idx = div.id; 
			//var len = idx.length-1;
			var len=idx.indexOf("_")+1;
			var i = idx.substr(len,idx.length);
			wc.prswitch(i);
		}
		//div.style.height = a ? 80 : 20 + "px";
	},
	
	look : function (a) {
		var wc = this;
		if (wc.timer != 0) {
			window.clearTimeout(wc.timer);
			wc.timer = 0;
		}
		wc.timer = window.setTimeout(function () {
			wc.show(a);
		}, wc.time);
	},
	prswitch:function(i){
		dowitch(i);
		//document.getElementById('y').className='cugshow1';/*首页*/
		//document.getElementById('y0100000000').className='cugshow1';/*新闻聚焦*/
		//document.getElementById('y0500000000').className='cugshow1';/*专题报道*/
		//document.getElementById('yZ000000000').className='cugshow1';/*政务公开*/
		//document.getElementById('y0501000000').className='cugshow1';/*组织机构*/
		//document.getElementById('y0600000000').className='cugshow1';/*队伍建设*/
		//document.getElementById('yC000000000').className='cugshow1';/*处室协会*/
		//document.getElementById('y0700000000').className='cugshow1';/*消费维权*/
		//document.getElementById('y0800000000').className='cugshow1';/*工作研究*/
		//document.getElementById('y0900000000').className='cugshow1';/*红盾文化*/
		//document.getElementById(i).className='cugshow';
		
		//document.getElementById('yy').style.display='none';
		//document.getElementById('yy0100000000').style.display='none';
		//document.getElementById('yy0500000000').style.display='none';
		//document.getElementById('yyZ000000000').style.display='none';
		//document.getElementById('yy0501000000').style.display='none';
		//document.getElementById('yy0600000000').style.display='none';
		//document.getElementById('yyC000000000').style.display='none';
		//document.getElementById('yy0700000000').style.display='none';
		//document.getElementById('yy0800000000').style.display='none';
		//document.getElementById('yy0900000000').style.display='none';
		//document.getElementById('y'+i).style.display='block';
	}

	
}
 