// JavaScript Document

/* ---- code shifted from footer_fp_index_test_m.php page -------*/

function checkOption(str_val)
{
      document.getElementById("showOption").style.display = "none";
	  selected_text=str_val;
	   //var selected_text = document.myForm.selectoption.options[document.myForm.selectoption.options.selectedIndex].value;
	   //below condition by jyoti
	  //alert (selected_text);
	   if(selected_text==0)
		{
			//document.getElementById("showOption").innerHTML = "";
		    //document.formFooter.comments.value ="";
			//document.getElementById("addnews").style.display="none";
		} 

	   
	   if(selected_text==1)
	   {
		   /* var msg=" This contact page is for business enquiries to Housingnet only.We are a data company and not a Housing Association. Please search for the Housing Association you wish to contact and you will find their details on that page.E-mails are not links they have to be cut and pasted into your e-mail message.";*/
		  // var msg="This contact page is for business enquiries to Housingnet only.\n\nWe want you to use the site but we really can’t help with any other Social Housing related enquiry. Sorry.\n\nPlease search for the Housing Association you wish to contact and you will find their details on that page.\n\nThank-you,\nHousingnet Admin";
		   document.getElementById("showOption").style.display = "block";
			<?
				/*$msg="This contact page is for business enquiries to Housingnet only.We are a data company and not a Housing Association. Please search for the Housing Association you wish to contact and you will find their details on that page.E-mails are not links they have to be cut and pasted into your e-mail message.";
				$msg=urlencode(nl2br($msg));*/
				//$msg="This contact page is for business enquiries to Housingnet only.\n\nWe want you to use the site but we really can’t help with any other Social Housing related enquiry. Sorry.\n\nPlease search for the Housing Association you wish to contact and you will find their details on that page.\n\nThank-you,\n\nHousingnet Admin";
				$msg=urlencode(nl2br($msg));
			?>
			//window.location="thankyou.php?backpage=contactus.php";
			
			document.getElementById("contactMessage").innerHTML ="";
			document.getElementById("contactMessage").style.display = "none";
		} 
		else if(selected_text==2)
		{
		//alert('option2');
		
		//document.getElementById("contactMessage").style.display= "block";
		//document.getElementById("contactMessage").innerHTML = "Have you read our FAQ section and the notes on the Export page?. If you still require assistance please let us know in the box below.";
		
		 document.getElementById("showOption").style.display = "none";

		document.getElementById("contactMessage").style.display = "block";
		document.getElementById("contactMessage").innerHTML = "<b>Have you read our <a href='faq.php' class='footerTextBody'>FAQ section</a> and the notes on the <a href='export.php' class='footerTextBody'>Export page</a>? If you still require assistance please let us know in the box below.</b><br/><div class=\"footerTextBody\" style='position:absolute; float:right; right:10; font-size:11px;'><a href='javascript:void(0);' onclick='document.getElementById(\"contactMessage\").style.display=\"none\";'><u>Close</u></a><\/div>";
			

			//document.getElementById("showOption").innerHTML = "Have you read our <a href='faq.php' style='color:000099'>FAQ section</a> and the notes on the <a href='export.php' style='color:000099'>Export page</a>?. If you still require assistance please let us know in the box below.";
		    //document.myForm.comments.value ="";//jyoti 190908
			//document.getElementById("addnews").style.display="none";
		} else if(selected_text==3)
		{
			document.getElementById("contactMessage").innerHTML ="";
			document.getElementById("contactMessage").style.display = "none";
			document.getElementById("showOption").style.display = "none";

			
	        //document.myForm.comments.value ="";//jyoti 190908
			//document.getElementById("addnews").style.display="none";
			
			
			
		} 
		else if(selected_text==4)
		{
		 //  document.getElementById("showOption").innerHTML = "Any Housing Association or Local Authority employee can gain <a href='accessurl.php'>Access to our system</a> using their work email address via the Access page. From Access they can edit any of the data we hold on their organization and register for Free to use the Housingnet data. <br><br>We really appreciate being informed of any errors or changes in the data we hold so please let us know in the form below. The name and contact fields are not required so do not have to be completed if you dont want to.";
		   //document.myForm.comments.value ="";//jyoti 190908
		   //document.getElementById("addnews").style.display="none";
		   
			document.getElementById("contactMessage").style.display = "block";
			document.getElementById("contactMessage").innerHTML = "Any Housing Association or Local Authority employee can gain <a href=\"accessurl.php\">Access to our system<\/a> using their work email address via the Access page. From Access they can edit any of the data we hold on their organization and register for Free to use the Housingnet data. <br><br>We really appreciate being informed of any errors or changes in the data we hold so please let us know in the form below. The name and contact fields are not required so do not have to be completed if you dont want to.<br><div  class=\"footerHeadingB\" style='position:absolute; float:right; right:10; font-size:11px;'><a href='javascript:void(0);' onclick='document.getElementById(\"contactMessage\").style.display=\"none\";'><u>Close<\/u><\/a><\/div>";
			
			document.getElementById("showOption").style.display = "none";
		   

		} 
		else if(selected_text==5)
		{
			//document.getElementById("showOption").innerHTML = "";
			//document.myForm.comments.value ="";//jyoti 190908
			//document.getElementById("addnews").style.display="none";
			document.getElementById("contactMessage").innerHTML ="";
			document.getElementById("contactMessage").style.display = "none";
			document.getElementById("showOption").style.display = "none";
		} 
		else if(selected_text==6)
		{
			location.href ="forgot_pass.php";
			//document.getElementById("addnews").style.display="none";
			document.getElementById("contactMessage").innerHTML ="";
			document.getElementById("contactMessage").style.display = "none";
			document.getElementById("showOption").style.display = "none";
		}
		else if(selected_text==7)
		{
			///document.getElementById("addnews").style.display="none";
			//document.myForm.comments.value="";
			//document.getElementById("showOption").innerHTML = "";
			document.getElementById("contactMessage").innerHTML ="";
			document.getElementById("contactMessage").style.display = "none";
			document.getElementById("showOption").style.display = "none";
		}
		else if(selected_text==8)
		{
		     //document.getElementById("addnews").style.display="none";
			 //document.myForm.comments.value="";
			 //document.getElementById("showOption").innerHTML = "";
			 
			 document.getElementById("contactMessage").innerHTML ="";
			document.getElementById("contactMessage").style.display = "none";
			document.getElementById("showOption").style.display = "none";
		}
		else if(selected_text==9)
		{
			/*document.myForm.comments.value="Add your News here";
			document.getElementById("showOption").innerHTML = "";
			document.getElementById("addnews").style.display="block";
			
			*/
			document.getElementById("contactMessage").innerHTML ="";
			document.getElementById("contactMessage").style.display = "none";
			document.getElementById("showOption").style.display = "none";
			window.location="generalnews.php";
			
		}
  }
