
function tests(){
//alert("hello");
var today = new Date();
var seconds = today.getSeconds();
var sec = seconds / 10;
var rsec = Math.round(sec)
var num = seconds - rsec * 10;
var article = num + 5;
var testimonial = new Array(10);
testimonial[0] = "&quot;We had an awesome time - thank you. The hotel was excellent and we couldn't have asked for a nicer golf course. A perfect weekend and brilliantly organised&quot; <br /><span class='hosp-dates'>Murray Campbell</span>";
testimonial[1] = "&quot;Your booking service was very efficient and thorough&quot;<br /><span class='hosp-dates'>Margaret Barnes</span>";
testimonial[2] = "&quot;Thanks for putting together such a great weekend. The entire group had an outstanding time and everything went smoothly. We will be in touch for next year's trip!&quot; <br /><span class='hosp-dates'>Daniel Thornton</span>";
testimonial[3] = "&quot;The venue was excellent - thanks for recommending it! The course is very good and hotel facilities were ideal. We would be interested in other weekend offers and hopefully book again shortly&quot; <br /><span class='hosp-dates'>Paul Kwei</span>";
testimonial[4] = "&quot;Many thanks for your help and organisation&quot;<br /><span class='hosp-dates'>Jeff Roden</span>";
testimonial[5] = "&quot;Booking a golf holiday has never been easier and we will definitely use your services again for next year's golf society trip&quot;<br /><span class='hosp-dates'>Edward Andrews</span>";
testimonial[6] = "&quot;YourGolfBreaks.com and your goodself - very helpful and efficient. Your description of the golfing facilities was spot on&quot; <br /><span class='hosp-dates'>Maureen Harris</span>";
testimonial[7] = "&quot;Our annual trip to Home of Golf could not have been better organised. Many Thanks - we'll be in contact in due course for next years tour!&quot; <br /><span class='hosp-dates'>Simon Thorpe</span>";
testimonial[8] = "Check out our <a href='http://www.yourgolfbreaks.com/special-golf-offer-of-the-week.html'>Special Offer of the Week</a>";
testimonial[9] = "<a href='http://www.yourgolfbreaks.com/your-golf-travel-newsletter.html'>Sign up to our newsletter</a> now to get the best of YourGolfBreaks.com";


document.getElementById('testcontent').innerHTML= testimonial[article];

return true;
}

function senddata(so){
		
		var index;

		//document.form1.soi1.value = so;

		var input1 = so;
		var inlength = input1.length;
		var input2;
		var offer1 = "";

		for(index=0; index<inlength; index++)
		{
			input2 = input1.charAt(index);
			if(input2 == " ")
			{input2 = "+";
			}
			offer1 = offer1 + input2;

		}

		var ven = document.title;
		var venend = ven.indexOf("-");
		var ven1 = "";
		var ven2 = "";
		
		//alert(so + '\n' + ven);
		
		for(index=0; index<venend; index++){
			ven2 = ven.charAt(index);
			if(ven2 == " "){ven2 = "+"}
			ven1 =  ven1 + ven2;
		}
		
		//alert("About to open page");
		
		window.open('enquiry-vspof-event.html?'+offer1+'='+ven1+'=','_blank','height=410px, width=600px, screenX=100, left=100, screenY=100, top=100');

		return true;
}

function spof_num(){
          var form = document.spof_enquiry;
          var input1 = document.location.search;
          var flength = input1.length;
          var in1 = "";
          var offer1 = "";
          
          //alert(input1);
          // change input1 text
          for(index=1; index<flength; index++){
          
          in1 = input1.charAt(index);
          if(in1 == "+")
          {in1 = " ";
          }
          offer1 = offer1 + in1;
          
          }
          
          form.spof.value = offer1;
          //alert(offer1);
          }

function retdata(){

		var input1 = document.location.search;
		var in1length = input1.length;
		var in1 = "";
		var in2 = "";
		var offer1 = "";
		var ven1 = "";
		var inend1 = input1.indexOf("=");
		
		//alert(input1);
		// change input1 text
		for(index=1; index<inend1; index++){

			in1 = input1.charAt(index);
			if(in1 == "+")
			{in1 = " ";
			}
			offer1 = offer1 + in1;

		}
		
		for(index=inend1+1; index<in1length-2; index++){
			in2 = input1.charAt(index);
			if(in2 == "+")
			{in2 = " ";
			}
			ven1 = ven1 + in2;
		}
		
		//alert(offer1 + '\n' + ven1);
		
		document.vspof_enquiry.special_offer.value = offer1;
		document.vspof_enquiry.venue.value = ven1;
		

		return true;
}