var menushow;
function showmenu(menu){ 
    if(menushow) 
    menushow.style.visibility="hidden" 
    menushow=menu 
    menu.style.visibility="visible" 
} 
function hidemenu(menu){ 
    menu.style.visibility="hidden" 
} 
function hideshow() 
{ 
    if(menushow) 
    menushow.style.visibility="hidden" 
}

function expand(str_str) {   
    if (document.all.item("div_"+str_str).style.display=='none') {
	    document.all.item("div_"+str_str).style.display='block';
		document.all.item("img_"+str_str).src='images/tree6.gif';
	}
    else {
        document.all.item("div_"+str_str).style.display='none';
		document.all.item("img_"+str_str).src='images/tree5.gif';
	}	
}

function admin_Size(num,objname)
{
	var obj=document.getElementById(objname)
	if (parseInt(obj.rows)+num>=3) {
		obj.rows = parseInt(obj.rows) + num;	
	}
	if (num>0)
	{
		obj.width="90%";
	}
}
function CheckAll(thisform)
{
	for (var i=0;i<thisform.elements.length;i++)
    {
	var e = thisform.elements[i];
	if (e.Name != "chkAll"&&e.disabled!=true)
		e.checked = thisform.chkAll.checked;
    }
}
function ConfirmDel(thisform)
{
	if(confirm("确定要删除选中的记录吗？"))
	    return true;
	else
	    return false;
}
function unselectall(thisform)
{
    if(thisform.chkAll.checked)
	{
		thisform.chkAll.checked = thisform.chkAll.checked&0;
    } 	
}

function helpscript(n){
	txtRun=n;window.open('admin_helpview.asp','admin_help','toolbar=no,menubar=no,scrollbars=no, resizable=1, location=no, status=no,top=0,left=0,width=600,height=300')

}

function runscript(n){
	txtRun=n;window.open("admin_templates_view.asp","templates_view")
}
	function showimages(Obj){
	sFromUrl =  Obj.value;
	var sHTML = '<a href="#" alt="单击关闭" onClick ="ClearObj()"><img src="'+sFromUrl+'" border="0" align=center onmousewheel="return bbimg(this)" onload="javascript:if(this.width>screen.width-800)this.style.width=screen.width-800;"';
	sHTML = sHTML+'></a>';
	if (sFromUrl.length<10){sHTML='';}
	document.getElementById('showimage').innerHTML = sHTML;
}
function ClearObj(){
	
		document.getElementById('showimage').innerHTML = "";

	}
//图片预揽功能

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 showImg(sid)
{
whichEl = eval( sid);
if (whichEl.style.display == "none")
{
eval( sid + ".style.display=\"\";");
}
else
{
eval( sid + ".style.display=\"none\";");
}
}
