

function updateViewCount(paintingId)
{  
  //alert("here");
  try
  {    // Firefox, Opera 8.0+, Safari    
  	xmlHttp=new XMLHttpRequest();    
  }
  catch (e)
  {    // Internet Explorer    
  
	  try
	  {      
		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
	  }
	  catch (e) 
	  {      
		try
		{        
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        
		}
		catch (e)
		{        
			alert("Your browser does not support AJAX!");        
			return false;        
		}      
	  }    
   }  

  xmlHttp.open("GET","ajaxUpdateViewCount.asp?id=" + paintingId + "&time=" + new Date().getTime(),true);
  xmlHttp.send(null);
	return true;
}

function DisplayMenu(Params, theForm){

                    
						 
						 
						 if (document.getElementById(Params).style.display == "") {
							
                            document.getElementById(Params).style.display = "none";  
							document.getElementById("showCheque").style.display = "none";

                          } else {
							  if(theForm.artistPaid.value == "on")
							  {
								  document.getElementById("showCheque").style.display = "";
								  }
							//alert "test1";
                            document.getElementById(Params).style.display = "";                            

                          }
						  
						 

}

function DisplayMenu(Params){

                    
						 
						 
						 if (document.getElementById(Params).style.display == "") {
							
                            document.getElementById(Params).style.display = "none";  
				

                          } else {
							 
                            document.getElementById(Params).style.display = "";                            

                          }
						  
						 

}

function compile(form){
	
	if (form.dated.value == "Accounts")
		{
			form.action ="accounts.asp";
		}
	else if(form.dated.value == "Stock")
		{
			form.action ="stock.asp";
		}
		else
		{
			form.action ="expenseList.asp";
		}
		
	form.submit();	
}

function checkSelected(form){
	
var x=form.finishDate;
x.disabled=(form.dated.selectedIndex == 2);

}