function CheckAll(form) {  
	for (var i=0;i<form.elements.length;i++)  
	{  
		var e = form.elements[i];  
		if (e.name != 'chkall')  
		e.checked = true // form.chkall.checked;  
	}  
} 
 
function ContraSel(form) {
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
		if (e.name != 'chkall')
		e.checked=!e.checked;
	}
}
function bbimg(o){
	var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
	return false;
}
function imgzoom(img,maxsize){
	var a=new Image();
	a.src=img.src
	if(a.width > maxsize * 4)
	{
		img.style.width=maxsize;
	}
	else if(a.width >= maxsize)
	{
		img.style.width=Math.round(a.width * Math.floor(4 * maxsize / a.width) / 4);
	}
	return false;
}

function storePage() {
	d=document;
	t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');
	void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=52z.com&title='+escape(d.title)+'&url='+escape(d.location.href)+'&desc='+escape(t),'vivi','scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes'));
	vivi.focus();
}

//搜索下拉菜单
var Se_Hidden_Div = '';
Se_Hidden_Div = '<div id="HiddenDiv" style="display:none; z-index:999;margin:0 auto;margin-left:956px !important;margin-left:820px; margin-top:142px; width:65px; height:140px; position:absolute; border:solid 1px #A3BFE7; background-color:#F0F9FF;">';
Se_Hidden_Div = Se_Hidden_Div + '<span style="width:65px; height:20px; text-align:center; line-height:20px; cursor:hand;" onclick="Hidden_DivAValue(\'1\',\'1\',\'0\',\'Title\',\'文章教程\');">文章教程<\/span>';
Se_Hidden_Div = Se_Hidden_Div + '<br><span style="width:65px; height:20px; text-align:center; line-height:20px; cursor:hand;" onclick="Hidden_DivAValue(\'1\',\'1006\',\'0\',\'Title\',\'新闻中心\');">新闻中心<\/span>';
Se_Hidden_Div = Se_Hidden_Div + '<br><span style="width:65px; height:20px; text-align:center; line-height:20px; cursor:hand;" onclick="Hidden_DivAValue(\'2\',\'2\',\'0\',\'Title\',\'软件资源\');">软件资源<\/span>';
Se_Hidden_Div = Se_Hidden_Div + '<br><span style="width:65px; height:20px; text-align:center; line-height:20px; cursor:hand;" onclick="Hidden_DivAValue(\'5\',\'1000\',\'0\',\'Title\',\'产品中心\');">产品中心<\/span>';
Se_Hidden_Div = Se_Hidden_Div + '<br><span style="width:65px; height:20px; text-align:center; line-height:20px; cursor:hand;" onclick="Hidden_DivAValue(\'1\',\'1007\',\'0\',\'Title\',\'成功案例\');">成功案例<\/span>';
Se_Hidden_Div = Se_Hidden_Div + '<br><span style="width:65px; height:20px; text-align:center; line-height:20px; cursor:hand;" onclick="Hidden_DivAValue(\'1\',\'1008\',\'0\',\'Title\',\'服务支持\');">服务支持<\/span>';
Se_Hidden_Div = Se_Hidden_Div + '<br><span style="width:65px; height:20px; text-align:center; line-height:20px; cursor:hand;" onclick="Hidden_DivAValue(\'1\',\'1001\',\'0\',\'Title\',\'雨缘博客\');">雨缘博客<\/span>';
Se_Hidden_Div = Se_Hidden_Div + '<br><span style="width:65px; height:20px; text-align:center; line-height:20px; cursor:hand;" onclick="Hidden_DivAValue(\'4\',\'4\',\'0\',\'Title\',\'留言搜索\');">留言搜索<\/span>';
Se_Hidden_Div = Se_Hidden_Div + '</div>';
document.write(Se_Hidden_Div);

//选择值并且关闭隐藏层
function Hidden_DivAValue(ModuleType,ChannelID,ClassID,Field,NameStr)
{
	if (ModuleType == '' || NameStr == '')
	{
		return;
	}
	else
	{
		$('Setype').value = '搜索频道';
		$('ModuleType').value = ModuleType;
		$('ChannelID').value = ChannelID;
		$('ClassID').value = ClassID;
		$('Field').value = Field;
		$('Setype').value = NameStr;
		$('HiddenDiv').style.display = 'none';
	}
}

//显示隐藏层
function Dis_HiddenDiv()
{
	$('HiddenDiv').style.display = '';
}

//提交搜索表单
function myCheckSearch()
{
	var KeyStr = document.Search_form.keyword.value;
	var Se_Type = document.Search_form.Setype.value;
	if (KeyStr == '')
	{
		alert('搜索关键字不能为空！');
		return;
	}
	if (Se_Type == '')
	{
		alert('请选择搜索类型！');
		return;
	}
	//document.Search_form.action = document.Search_form.SeTypeTxt.value+document.Search_form.keyword.value
	document.Search_form.submit();
}


//2007-03-30
//鼠标移动背景
function overColor(Obj,ClassStr)
{
	Obj.className=ClassStr;
}
function outColor(Obj,ClassStr)
{
	Obj.className=ClassStr;
}

//改变字体大小
function ChangeFontSize(Size,TxtID)
{
	if (Size == '' || TxtID =='')
	{
		return;	
	}
	$(TxtID).style.fontSize = Size + 'px';
}
