function commonOpen(uri , wName , w , h ){
	var property = "width=" + w + ",height=" + h + ",resizable=no,scrollbars=yes" ;
	window.open(uri , wName , property);
}


var useredit;
var w;

function display_obj(obj_name)
{

	obj_array = obj_name.split("|");


	l1 = obj_array.length;
	
	for (i=0;i<l1;i++)
	{
		if (obj_array[i] != "")
		{
		
			dis_obj = eval("document.all." + obj_array[i]);
		
			if(dis_obj != null) 
			{
				if (dis_obj.length != null)
				{

					 l2 = dis_obj.length;
		
					 for(j=0;j<l2;j++)
					 {
						dis_obj.item(j).style.display = "block";
					 }
				}
				else
				{
					dis_obj.style.display = "block";
				}
			}
		}
	}
}



function hidden_obj(obj_name)
{


	obj_array = obj_name.split("|");


	l1 = obj_array.length;
	
	for (i=0;i<l1;i++)
	{

		if (obj_array[i] != "") 
		{
		
			hidd_obj = eval("document.all." + obj_array[i]);
		
			if(hidd_obj != null) 
			{
				if (hidd_obj.length != null) 
				{

					 l2 = hidd_obj.length;
		
					 for(j=0;j<l2;j++)
					 {
						hidd_obj.item(j).style.display = "none";
					 }
				}
				else
				{
					hidd_obj.style.display = "none";
				}
			}
		}
	}
}

function clear_tr_children(obj_name)
{

	clear_obj = eval("document.all." + obj_name);	
	
	if (clear_obj != null)
	{
		l1 = clear_obj.cells.length 
		
		
		
		for (i=0;i<l1;i++)
		{
			obj = clear_obj.cells.item(i)
			
			
			l2 = obj.children.length
			
			
			for(j=0;j<l2;j++)
			{
				tname = obj.children(j).tagName 
				
				if (tname == "INPUT")
				{
					if (obj.children(j).type == "text" || obj.children(j).type == "password" || obj.children(j).type == "hidden")
					{
					
						
						obj.children(j).value = ""; 
					}
					else if(obj.children(j).type == "radio" || obj.children(j).type == "checkbox")
					{
						
						obj.children(j).checked = false ;
					}
				}
				else if(tname == "SELECT") 
				{
					obj.children(j).selectedIndex = 0; 
				}
				else if(tname = "TEXTAREA") 
				{
					obj.children(j).value = "";
				}
			}
		}
	}
}
function validationPID(obj1,obj2){

 var jumin1 = obj1.value;
 var jumin2 = obj2.value;

 var tot=0, result=0, re=0, se_arg=0;
 var chk_num="";
 var jumin = jumin1 + jumin2;

 if (jumin.length != 13){
	 return false;
 }else{
	 for (var i=0; i <12; i++){
		 if (isNaN(jumin.substr(i, 1)))
			 return false;
		 se_arg = i;
		 if (i >= 8)
			 se_arg = i - 8;
		 tot = tot + Number(jumin.substr(i, 1)) * (se_arg + 2)
  }
  if (chk_num != "err"){
	  re = tot % 11;
	  result = 11 - re;
	  if (result >= 10) result = result - 10;
	  if (result != Number(jumin.substr(12, 1))) return false;
	  if ((Number(jumin.substr(6, 1)) < 1) || (Number(jumin.substr(6, 1)) > 4)) return false;
  }
 }
 return true;
}

function MShowModalWindow(url, title, width, height){
	var top = (screen.height - height) / 2;
	var prp = ""
	prp += 	"dialogTop:" + top + "px;"
	    +  	"dialogWidth:" + width + "px;"
	    +  	"dialogHeight:" + height + "px;"
	    +	"center:yes;resizable:no;help:no;status:yes";
	return window.showModalDialog(url, title, prp);
}

