//弹开修改窗口
function openupdate(climewebid){
	var th =  document.form1;
	th.action_flag.value="updateclimeweb";
	var window_height = screen.availHeight -370 ;
	var window_width = screen.availWidth -150 ;
	var window_dimensions = "top = 20" + ",left = 50" + ",height=" + window_height + ",width=" + window_width + ",scrollbars=yes" + ",resizable=1,status=yes";
	window.open('','update',window_dimensions);
	th.action = "updateclimeweb.jsp?climewebid="+climewebid;
	th.target = "update";
	th.submit();
}
//弹开添加窗口
function openadd(){
	var th =  document.form1;
	th.action_flag.value="addclimeweb";
	var window_height = screen.availHeight -370 ;
	var window_width = screen.availWidth -150 ;
	var window_dimensions = "top = 20" + ",left = 50" + ",height=" + window_height + ",width=" + window_width + ",scrollbars=yes" + ",resizable=1,status=yes";
	window.open('','addclimeweb',window_dimensions);
	th.target = "addclimeweb";
	th.action = "addclimeweb.jsp";
	th.submit();
}

//添加提交
function addsubmit(){
	var th =  document.form1;
	if(trim(th.web_name.value)==""){
		alert("请输入网站名称！");
		return;
	}
	if(trim(th.web_url.value)==""){
		alert("请输入网站地址！");
		return;
	}
	th.action_flag.value = "add";
	th.action = "addclimeweb.jsp";
	th.target = "_self";
	th.submit();
}

//修改提交
function updatesubmit(){
	var th =  document.form1;
	if(trim(th.web_name.value)==""){
		alert("请输入网站名称！");
		return;
	}
	if(trim(th.web_url.value)==""){
		alert("请输入网站地址！");
		return;
	}
	th.action_flag.value = "update";
	th.action = "updateclimeweb.jsp";
	th.target = "_self";
	th.submit();
}

//删除提交
function dodelete(climewebid){
	if (!confirm("确定删除本条信息么?")){
		return ;
	}
	var th = document.form1;
	th.action_flag.value="delete";
	th.action = "climewebmanager.jsp?hid_CurrPage=&climewebid="+climewebid;
	th.target = "_self";
	th.submit();
}

//回刷
function doreload(){
	var th =  document.form1;
	th.action_flag.value="reload";
	th.action = "climewebmanager.jsp";
	th.target = "_self";
	th.submit();
}

