function popUp(URL, id, popW , popH ) {
//day = new Date();
//id = day.getTime();
if (document.all || document.layers) {
   w = screen.availWidth;
   h = screen.availHeight;
}
var leftPos = (w-popW)/2, topPos = (h-popH)/2;
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+popW+",height="+popH+",left ="+leftPos+",top = "+topPos+"');");

eval("page"+id).focus();
}

function checkBox_serialize(checkbox_name){
 var cb = document.getElementsByName(checkbox_name);
 var cb_string="";
 for(var i=0 ; i < cb.length ; i++ ){
   	 if(cb[i].checked){
		 cb_string += cb[i].name+"[]"+"="+cb[i].value+"&";
	 }
 }
 //alert((cb_string=="")?"no checked box":cb_string.substr(0 , cb_string.length-1) );
 return (cb_string=="")?false:cb_string.substr(0 , cb_string.length-1);
}

function checkAllBox(checkbox_name , flag){
 var cb = document.getElementsByName(checkbox_name);

 for(var i=0 ; i < cb.length ; i++ ){
   	 cb[i].checked = flag;
	 }
}

function ajaxCall($url , $para , $callBack){

new Ajax.Request($url,   

{     
method:'post',
parameters: $para,
name: 'ray',
  
onSuccess: $callBack,     

onFailure: function(){ 
alert('Something went wrong...') 
}   

}); 

}