// JavaScript Document

function check_lbs() {
txt=document.isn.lbs;
if (txt.value.length<1) { alert("Please, enter your weight"); return false; }
return true;
}

function check_kg() {
txt=document.isn1.kg;
if (txt.value.length<1) { alert("Please, enter your weight"); return false; }
return true;
}

function showit(id) {

some=document.getElementById(id).style;
eval("some.display = \"" + 'block' + "\""); 
}

function hideit(id) {

some=document.getElementById(id).style;
eval("some.display = \"" + 'none' + "\""); 
}

function showhide(id) { 
some=document.getElementById(id).style;
if (some.display=="none") { eval("some.display = \"" + 'block' + "\""); 

}

else eval("some.display = \"" + 'none' + "\""); 
}

function showhidecat(id,block) { 
some=document.getElementById(id).style;
if (some.display=="none") { eval("some.display = \"" + 'block' + "\""); 
document.getElementById('a_'+block).src='http://www.2dayarticles.com/images/a_minus.png';
}

else { 
eval("some.display = \"" + 'none' + "\""); 
document.getElementById('a_'+block).src='http://www.2dayarticles.com/images/a_plus.png';
}
}

function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }


<!-- Paste this code into an external JavaScript file  -->

/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Down Home Consulting :: http://downhomeconsulting.com */

/*
Country State Drop Downs v1.0.
(c) Copyright 2005 Down Home Consulting, Inc.
www.DownHomeConsulting.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, itness for a particular purpose and noninfringement. in no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

*/

// If you have PHP you can set the post values like this
//var postState = '<?= $_SESSION["postvalue"]["state"] ?>';
//var postCountry = '<?= $_SESSION["postvalue"]["country"] ?>';
//var postState = '';
//var postCountry = '';

// State table
//
// To edit the list, just delete a line or add a line. Order is important.
// The order displayed here is the order it appears on the drop down.
//
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Michael J. Damato | http://developing.damato.net/ */
// State lists

function checkAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = true ;
}


function uncheckAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = false ;
}

/*
function uncheckAll(field)
{
for (i = 0; i < field.length; i++)
	document.getElementById(field + i).checked = false;
}
*/


checked=false;
function checkedAll (frm1) {
	var aa= document.getElementById('myform');
	 if (checked == false)
          {
           checked = true
          }
        else
          {
          checked = false
          }
	for (var i =0; i < aa.elements.length; i++) 
	{
	 aa.elements[i].checked = checked;
	}
      }

function uncheckAllboxes(field, numberofcheckboxes)
		{ 
		for (i = 1; i <=numberofcheckboxes; i++) { 
			eval(field + i).checked = false;  }
		}



function changeSelect(fieldID, newOptions, newValues) {
  selectField = document.getElementById(fieldID);
  selectField.options.length = 0;
  for (i=0; i<newOptions.length; i++) {
    selectField.options[selectField.length] = new Option(newOptions[i], newValues[i]);
  }
}

// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}



