

function selectAll(chkid,v)
{
   var ids=document.all(chkid);
   if(ids==null) return;
   if ( typeof ids.length == 'undefined' )
   {
     ids.checked=v;
     return;
   }
   
   for(var i=0;i<ids.length;i++)
   {
      ids[i].checked=v;
   }
}

function getPagePath()
{
   var surl=document.location.href;
   var s=surl.lastIndexOf("/");
   return surl.substring(0,s+1);
}


function  queryString(name)
{
	var URLParams = new Object() ;
	var aParams = document.location.search.substr(1).split('&') ;
	for (i=0 ; i < aParams.length ; i++) {
	  var aParam = aParams[i].split('=') ;
	  URLParams[aParam[0]] = aParam[1] ;
	}
	
	return URLParams[name]
}


 function showModalDialogB(url,source,w,h)
	{
		var h=((h==null)||(h==0))?(screen.height-100):h;
		var w=((w==null)||(w==0))?(screen.width-100):w;

		return window.showModalDialog(url,source,"dialogHeight:" + h + "px;dialogWidth:" + w + "px;edge:Raised;center:Yes;help:No;resizable:No;status:No;Scroll:yes");
	}
	
	
 function showModalDialogA(url,source,w,h)
	{
		var h=((h==null)||(h==0))?(screen.height-100):h;
		var w=((w==null)||(w==0))?(screen.width-100):w;

		return window.showModalDialog(url,source,"dialogHeight:" + h + "px;dialogWidth:" + w + "px;edge:Raised;center:Yes;help:No;resizable:No;status:No;Scroll:No");
	}