	
	  var sPageUrl =document.URL;
	  
	  if (sPageUrl.indexOf('/index.html') != -1){

	  }
	  else if(sPageUrl.indexOf('.html') != -1){
	  }
	  else if(sPageUrl.indexOf('.htm') != -1){
	  }
	  else if(sPageUrl.indexOf('index.html') != -1){
	  }
	  else{
	   sPageUrl=sPageUrl +"index.html";
	  } 
	  
	  if(sPageUrl=="http://www.info.gov.bh/en/index.html")
		{
			page="homeeng";
		}
	  else if(sPageUrl=="http://www.info.gov.bh/ar/index.html")
		{
			page="homear";
		}
	 else if(sPageUrl.indexOf("http://www.info.gov.bh/en/")!=-1)
		{
			page="innereng";
		}
	  else if(sPageUrl.indexOf("http://www.info.gov.bh/ar/")!=-1)
		{
			page="innerar";
		}

	//alert(sPageUrl + " " + page);
		
				
			function submitform(eventArgument,month,year) {
		
		
				var theform;
				if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
					theform = document.event;
				}
				else {
					theform = document.forms["event"];
				}
						   		
		
				theform.movemonth.value = month;
				theform.moveyear.value = year;
				theform.date.value = eventArgument;
				theform.action.value = "search";
				//theform.page.value = page;
				
				if(theform.page.value=="")
						theform.page.value=page;
				
				//alert(theform.page.value);
				theform.submit();
			}
					
			function submitformdate(selectthing) {
		
		
				var theform;
				if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
					theform = document.event;
				}
				else {
					theform = document.forms["event"];
				}
						   		
				theform.movemonth.value = theform.movemonthselect.value;
				theform.moveyear.value = theform.moveyearselect.value;
				theform.action.value = "load";
				if(theform.page.value=="")
						theform.page.value=page;
				//alert(page);
				theform.submit();
				
			}
			