<!-- Start of Script for blinking text -->
/*
function blinkIt()
{
 if (!document.all)
 	return;
 else
 {
  for(i=0;i<document.all.tags('blink').length;i++)
  {
   s=document.all.tags('blink')[i];
   s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible';
  }
 }
}
<!-- End of Script for blinking text -->

<!-- Start of Script for fading text -->
hex1=255 // Initial color value
hex2=255
hex3=255

function fadetext()
{
 if(hex2>0)
 {
  //If color is not red yet
  hex2-=2; // increase color darkness
  hex3-=2;
  
  document.getElementById("jnrLogo").style.color="rgb("+hex1+","+hex2+","+hex3+")";
  setTimeout("fadetext()",50); 
 }
 else
 {
 	 hex1=255 //reset hex value
	 hex2=255
	 hex3=255
 }
}
<!-- End of Script for fading text -->
*/

<!-- Start of Script for locating city -->
function locateCity(location)
{
 document.location.href = "#" + location;
}
<!-- End of Script for locating city -->

<!-- Start of Script for image scroller -->
//Specify the slider's width (in pixels)
var sliderwidth="655px"
//Specify the slider's height
var sliderheight="100px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=2
//configure background color:
slidebgcolor="#FFFFFF"

//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<img src="images/slider.jpg" width=484 height=133 alt="JNR Electronics">'
leftrightslide[1]='<img src="images/slider1.jpg" width=484 height=133 alt="JNR Electronics">'

//Specify gap between each image (use HTML):
var imagegap=""

//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=0

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=slidespeed
leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'
var iedom=document.all||document.getElementById
if (iedom)
   document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>')
var actualwidth=''
var cross_slide, ns_slide

function fillup()
{
 if (iedom)
 {
  cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
  cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
  cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
  actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
  cross_slide2.style.left=actualwidth+slideshowgap+"px"
 }
 else if (document.layers)
 {
  ns_slide=document.ns_slidemenu.document.ns_slidemenu2
  ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
  ns_slide.document.write(leftrightslide)
  ns_slide.document.close()
  actualwidth=ns_slide.document.width
  ns_slide2.left=actualwidth+slideshowgap
  ns_slide2.document.write(leftrightslide)
  ns_slide2.document.close()
 }
 lefttime=setInterval("slideleft()",30)
}

function slideleft()
{
 if (iedom)
 {
  if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
  	 cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
  else
  	  cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"

  if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
  	 cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
  else
  	  cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"                                                         
 }
 else if (document.layers)
 {
  if (ns_slide.left>(actualwidth*(-1)+8))
  	 ns_slide.left-=copyspeed
  else
  	  ns_slide.left=ns_slide2.left+actualwidth+slideshowgap

  if (ns_slide2.left>(actualwidth*(-1)+8))
  	 ns_slide2.left-=copyspeed
  else
     ns_slide2.left=ns_slide.left+actualwidth+slideshowgap
 }
}
<!-- End of Script for image scroller -->

<!-- Start of Script for validating enquiry form -->
// whitespace characters
var whitespace = " \t\n\r";

// Check whether string s is empty
function isEmpty(s)
{ return ((s == null) || (s.length == 0)) }

function isWhitespace (s)
{
 var i;      
 // Is s empty?
 if (isEmpty(s)) return true;

 for (i = 0; i < s.length; i++)
 {
  // Check that current character isn't whitespace.
  var c = s.charAt(i);
  if (whitespace.indexOf(c) == -1) return false;
 }
      
 // All characters are whitespace.
 return true;
}
			
function ForceEntry(src, val, str)
{
 if(src == 'campaignType')
 {
  if (val.value == 'selectSource')
  {
   alert(str);
   return false;
  }
  else
  	  return true;
 }
 else
 {
  var strInput = new String(val.value);

  if (isWhitespace(strInput))
  {
   alert(str);
   return false;
  }
  else
  	  return true;
 }
}

function ValidateData()
{
  var CanSubmit = false;
  
  // Check to make sure that the full name field is not empty.
  CanSubmit = ForceEntry("contactPerson", document.forms[0].contactPerson,"Contact person cannot be empty");
  if(CanSubmit == true)
  {
   CanSubmit = ForceEntry("phone", document.forms[0].phone,"Phone cannot be empty");
   if(CanSubmit == true)
   {
   	CanSubmit = ForceEntry("requirements", document.forms[0].requirements,"Requirements cannot be empty");
	if(CanSubmit == true)
	{
	 CanSubmit = ForceEntry("campaignType", document.forms[0].campaignType,"How did you know about us?\n\nPlease provide source");
	 if(CanSubmit == true)
	 	return true;
	 else
		return false;
	}
	else
		return false;
   }
   else
   	   return false;
  }
  else
  	  return false;
}
<!-- End of Script for validating enquiry form -->