function getparms(){
	var len = arguments.length;
	var obj;
	if(len > 2 || len < 1){
		alert("error");
		return false;	
	}
	if(arguments[1] == "id" || arguments[1] == undefined)
		obj = document.getElementById(arguments[0]);
	if(arguments[1] == "name")
		obj = document.getElementByName(arguments[0]);
	return obj;
}

function goURL(strUrl){
	if(strUrl==""){
		document.location.href="#";
	}
	else{
		document.location.href=strUrl;
	}
}

function openURL(strUrl){
	if(strUrl==""){
		window.open("#");
	}
	else{
		window.open(strUrl);
	}
}
function openwindow(url,width,height){
    $("mask").style.position = "absolute";
	$("mask").style.top = "0px";
	$("mask").style.left = "0px";
	$("mask").style.width = "100%";
	$("mask").style.backgroundColor = "#000000";
	$("mask").style.display = "";
	$("mask").style.zIndex = "999";
	document.body.scrollTop = 0;
	document.body.scroll = "no";

	if(isMoz) 
		$("mask").style.MozOpacity = "0";
	if(isIE)
		$("mask").style.filter = "alpha(opacity=0)";
	var obj_iframe = $("popupiframe");//document.createElement("iframe");
	//if(obj_iframe==null)
	//   obj_iframe=document.createElement("iframe");
	//obj_iframe.allowtransparency="yes";
   	//obj_iframe.allowTransparency="true" 
	obj_iframe.src = url;
	if(!(isIE&&sUserAgent.indexOf("MSIE 6") > -1))
	   obj_iframe.allowTransparency="true";
	obj_iframe.style.position = "absolute";

	
	//obj_iframe.style.margin = "0px";
	//obj_iframe.style.padding = "0px";
	//obj_iframe.style.border="0px";
	obj_iframe.style.backgroundColor = "transparent";
	obj_iframe.style.backgroundImage = "none";
	obj_iframe.style.borderStyle="none";
    
   	//obj_iframe.frameborder="0";
   	//obj_iframe.border="0";
   	//obj_iframe.marginwidth="0";
   	//obj_iframe.marginheight="0";
   	//obj_iframe.scrolling="no";

    //obj_iframe.style.display="";
    obj_iframe.style.height = height+"px";
	obj_iframe.style.width = width+"px";
	//obj_iframe.id = 'popup';
	obj_iframe.style.zIndex = "1055";
	//obj_iframe.style.display=""
	//document.body.insertBefore(obj_iframe,$("mask"));
}

function closewindow(){
 		    var obj = top.document.getElementById("mask");
			var obj2 = top.document.getElementById('popupiframe');
			obj.style.display = "none";
		   	top.document.body.scrollTop = "";
			top.document.body.scroll = "";
			obj2.src="";
			obj2.style.width ="0px";
			obj2.style.height ="0px" ;
			obj2.style.display="none";
			
}
function getSelectedText(name){
var obj=document.getElementById(name);
for(i=0;i<obj.length;i++){
   if(obj[i].selected==true){
    return obj[i].innerHTML;      //关键是通过option对象的innerText属性获取到选项文本
   }
}
}
function getCheckedValue(name){
var obj=document.getElementsByName("arrExt[intCType]");
for(i=0;i<obj.length;i++){
   if(obj[i].checked==true){
    return obj[i].value;      
   }
}
}
