function Gen_OpenthickBox(fileurl,title,Extval,h,w)
{
	//alert(screen.height + ' >> '  + screen.width);
	//document.getElementById("parent_modal_win").value = fileurl;alert(document.getElementById("parent_modal_win").value);
	//v2
	var test = fileurl.split('?');
	//end
	if(test[0]=="register.php")
		var hi = screen.height-400;
	else
		var hi = h;
	
	var u = fileurl+"?"+Extval+"&keepThis=true&TB_iframe=true&height="+hi+"&width="+w;
	//alert(u);return false;
 	var t = title;
	var g = null;
	TB_show(t, u, g);
	return false;
}
function Gen_OpeninlinethickBox(inlineId,title,Extval,h,w)
{
	//alert(screen.height + ' >> '  + screen.width);
	var hi = h;
	var u = "#TB_inline"+"?"+Extval+"&inlineId="+inlineId+"&height="+hi+"&width="+w;
	//alert(u);return false;
 	var t = title;
	var g = null;
	TB_show(t, u, g);
	return false;
}
function Gen_OpenImagethickBox(title,imageurl)
{
	var g = null;
	TB_show(title, imageurl, g);
	return false;
}

function selectall()
{   
	var rs = (document.frmlist.abc.checked)?true:false;
	for(i=0;i<document.frmlist.elements.length;i++)
	{
	  	if(document.frmlist.elements[i].id == 'iId')
  		{
			document.frmlist.elements[i].checked = rs;
			
		}
	}  
}

function getCheckCount()
{	var x=0;

	for(i=0;i < document.frmlist.elements.length;i++)
	{	if (document.frmlist.elements[i].id == 'iId' && document.frmlist.elements[i].checked == true) 
			{x++;}
	}
	return x;
}

function setmode(val)
{
    var y=0; var ans;
    y = getCheckCount();
    if(y>0)
	{	 
	   var msg="Are you sure to "+val+" the selected record(s)?";
      ans = confirm(msg);
		if(ans == true)
		{	
			document.frmlist.mode.value=val;  	
			document.frmlist.submit();
			return true;
		}
		else
		{return false;}
	}
	else
	{	    
    var alt_msg = "Please select a record(s) to "+val+"!";
    alert(alt_msg);	
    return false;	
    }    
}
