    var imageON = 0;
    var imageONName = 'img1';
    var ONImages = new Array();
    var MIDImages = new Array();
    var OFFImages = new Array();
    var imageTotal;

    var ONMenuImages = new Array();
    var OFFMenuImages = new Array();
    var imageMenuTotal;

    var strAddr = 'http://www.skyepl.co.in/'

    function preloadImages()
    {
	if (document.images)
	{
	  var a = preloadImages.arguments;
	  var s1 = 0;
	  var s2 = 0;
	  var s3 = 0;
	  imageTotal = a.length;
	  for(i = 0; i < a.length; i++)
	  {
	    if (a[i].indexOf("#") != 0)
	    {
   	      if (i < (a.length / 3))
	      {
		OFFImages[s1] = a[i];
		++s1;
	      }
   	      if ((i >= (a.length / 3)) && (i < 2 * (a.length / 3)))
	      {
		MIDImages[s2] = a[i];
		++s2;
              }
   	      if (i >= 2 * (a.length / 3))
	      {
		ONImages[s3] = a[i];
		++s3;
	      }
	    }
	  }
	}
//	document['img1'].src=ONImages[0];
    }

    function preloadMenuImages()
    {
	if (document.images)
	{
	  var b = preloadMenuImages.arguments;
	  var s1 = 0;
	  var s2 = 0;
	  imageMenuTotal = b.length;
	  for(i = 0; i < b.length; i++)
	  {
	    if (b[i].indexOf("#") != 0)
	    {
   	      if (i < (b.length / 2))
	      {
		OFFMenuImages[s1] = b[i];
		++s1;
	      }
	      else
	      {
		ONMenuImages[s2] = b[i];
		++s2;
	      }
	    }
	  }
	}
    }

    function imageSwitchTempOFF(imagename, imageON1)
    {
      if (document[imagename].src != strAddr + ONImages[imageON1])
      {
        document[imagename].src = OFFImages[imageON1];
      }
      hideMenu(imagename);
    }

    function imageSwitchTempON(imagename)
    {
      var i = 0;
      var flag = false;
      while (i < (imageTotal / 2))
      {
	if ((document[imagename].src == strAddr + OFFImages[i]) && (flag == false))
	{
	  document[imagename].src = MIDImages[i];
	  flag = true;
	}
	++i;
      }
      showMenu(imagename);
    }

    function imageSwitchOn(imagename)
    {  
      var i = 0;
      var flag = false;
      if (imageON != -1)
      {
        document[imageONName].src = OFFImages[imageON];
      }

      while (i < (imageTotal / 2))
      {
	if (((document[imagename].src == strAddr + OFFImages[i]) || (document[imagename].src == strAddr + ONImages[i]) || (document[imagename].src == strAddr + MIDImages[i])) && (flag == false))
	{
	  document[imagename].src = ONImages[i];
	  imageON = i;
          imageONName = imagename;
	  flag = true;
	}
	++i;
      }
    }

function showMenu(imagename)
{
    if (imagename == 'img4')
    {
      document.getElementById("product").style.visibility = "visible";
    }
}

function hideMenu(imagename)
{
    if (imagename == 'img4')
    {
      document.getElementById("product").style.visibility = "hidden";
    }
}

function showFeatures(prodId, imagename)
{
  if (document.getElementById(prodId).style.visibility == "hidden") 
  {
      document.getElementById(prodId).style.visibility = "visible";
      document[imagename].src = "images/Products/DetailsPic1.jpg"
  }
  else
  {
      document.getElementById(prodId).style.visibility = "hidden";
      document[imagename].src = "images/Products/DetailsPic.jpg"
  }
}

function pageLoad()
{
  document['page'].src = "images/Products-splash.gif";
  hideMenu();
}

function currMenuItem(imageName, imageNmbr, imageOn)
{
    if (imageOn == true)
    {	
      document[imageName].src = ONMenuImages[imageNmbr];
    }
    else
    {
      document[imageName].src = OFFMenuImages[imageNmbr];
    }
}

	function trim(strText) { 
    // this will get rid of leading spaces 
	while (strText.substring(0,1) == ' ') 
        strText = strText.substring(1, strText.length);

    // this will get rid of trailing spaces 
    while (strText.substring(strText.length-1,strText.length) == ' ')
        strText = strText.substring(0, strText.length-1);

   	return strText;
	} 
	
	function chkdetails()
	{
		if (trim(document.frmfeed.txtname.value) == ""){
			alert ("Please Enter Your Name...")
			document.frmfeed.txtname.focus()
			return false
		}
		if (trim(document.frmfeed.txtaddress.value) == ""){
			alert ("Please Enter Address...")
			document.frmfeed.txtaddress.focus()
			return false
		}
		if (trim(document.frmfeed.txtphone.value) == ""){
			alert ("Please Enter Your Phone No...")
			document.frmfeed.txtphone.focus()
			return false
		}
		if (trim(document.frmfeed.txtoccupation.value) == ""){
			alert ("Please Enter Your Occupation...")
			document.frmfeed.txtoccupation.focus()
			return false
		}
		if (trim(document.frmfeed.txtremark.value) == ""){
			alert ("Please Enter Your Remarks...")
			document.frmfeed.txtremark.focus()
			return false
		}
		
	return true
	}
	
	function sfocus()
	{
		document.frmfeed.txtname.focus()
	}

function abrir(url, w, h) {
	window.open(url,'window','width=' + w + ',height=' + h);
}

