<!--AJAX function by Rumit-->
function DataByPost(url,objId,postData,div_id)
{
    var selId = objId.split('|');//alert(selId);
	var passData = postData; //alert(passData);
	//alert(div_id);
	var AJAX = null;
	if (window.XMLHttpRequest) {
	   AJAX=new XMLHttpRequest();//for Mozila
	} 
	else
	 {
	   AJAX=new ActiveXObject("Microsoft.XMLHTTP");
	}
	if (AJAX==null) {
	   alert("Your browser doesn't support AJAX.");						
	   return false
	}
	 else
	  {
	   AJAX.open("POST",url,true);
	  //al	ert(url);
	   AJAX.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	   AJAX.onreadystatechange = function() {                
	 		if (AJAX.readyState==4 || AJAX.readyState=="complete")
			{  
			//alert(AJAX.responseText);
			   var msg=AJAX.responseText.split('|');
                 if(document.getElementById(div_id))   
		         document.getElementById(div_id).style.display='none'; 
                    for(i=0;i<selId.length;i++)
                      {
						//alert(msg[i]);
						 if(document.getElementById(selId[i]))
						  document.getElementById(selId[i]).innerHTML = msg[i];
						 //alert (document.getElementById(selId[i]).innerHTML);
                      }
			}
	   }                                  
	   AJAX.send(passData);
	  
	}
}
/* Function for AJAX */
function showContent(url,arg,opr,sel_id,div_id)
{

  var postData='';	
  var formVal=arg.split('|');

if(document.getElementById(div_id)) 
		   document.getElementById(div_id).style.display='';

	 for(i=1;i<=formVal.length;i++) 
		var postData =postData + 'value'+i+'='+escape(formVal[i-1])+'&';
            postData=postData + 'opr='+opr;
		//alert("url= "+url+"Post Data :"+postData+"sel_id="+sel_id+"div_id= "+div_id);	
	
		DataByPost(url,sel_id,postData,div_id);

}



function day1(val1,val2)
{
	val5 = val1+ '|' + val2; 
	
	//alert(val5);
	return val5;
}


function day7(val1,val2,val3,val4,val5,val6,val7,val8)
{
	val5 = val1 + '|' + val2 + '|' + val3 + '|' + val4+ '|' + val5+ '|' + val6+ '|' + val7+ '|' + val8 ;
	
	//alert(val5);
	
	return val5;
}




////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
