
var ie=false;if(document.all)
{ie=true;document.getElementById=function(id)
{return document.all[id];}}
function bookmark(theURL){var txt="Bookmark Us!"
var url=theURL;var who="CodeLifter.com Software and Scripts"
var ver=navigator.appName
var num=parseInt(navigator.appVersion)
if((ver=="Microsoft Internet Explorer")&&(num>=4)){document.write('<a href="javascript:window.external.AddFavorite(url,who);" ');document.write('onmouseover=" window.status=')
document.write("txt; return true ")
document.write('"onmouseout=" window.status=')
document.write("' '; return true ")
document.write('">'+txt+'</a>')}else{txt+="  (Ctrl+D)"
document.write(txt)}}
function textCounter(field,cntfield,maxlimit){if(field.value.length>maxlimit)
field.value=field.value.substring(0,maxlimit);else
cntfield.value=maxlimit-field.value.length;}
function ismaxlength(obj,cntObj){var mlength=obj.getAttribute?parseInt(obj.getAttribute("maxlength")):""
if(obj.getAttribute&&obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength);if(cntObj.innerHTML!==undefined)
cntObj.innerHTML=mlength-obj.value.length;if(cntObj.value!==undefined)
cntObj.value=mlength-obj.value.length;}
function MM_jumpMenu(targ,selObj,restore){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if(restore)selObj.selectedIndex=0;}
function dialog(src,name,width,height)
{newDialog=window.open(src,name,'toolbar=no, scrollbars=yes, directories=no, status=no, menubar=no, width='+width+',height='+height+', resizable=yes');if(newDialog==null)
alert('An error occured while trying to show a dialog. \nPlease make sure any popup blockers are disabled for this site.');else
newDialog.focus();}
var good;function checkEmailAddress(field){var goodEmail=field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);if(goodEmail){good=true}else{alert('Please enter a valid e-mail address.')
field.focus()
field.select()
good=false}}
function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop){newWindow=window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);newWindow.document.open();newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>');newWindow.document.write('</body></html>');newWindow.document.close();newWindow.focus();}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function flashEnabled()
{return true;}
function setScale(theScale)
{document.getElementById('ScaleHeight').innerHTML=theScale;}
function updateCM(theVAL)
{document.getElementById('HeightCM').value=theVal+'cm';}
function updateHeight(theRef)
{var n_feet,n_inches,n_value;n_value=document.getElementById('HiddenHeightCM').value;document.getElementById('HeightCM').innerHTML=n_value+'cm';n_feet=Math.round(((n_value/2.54)/12)-0.5)
n_inches=((n_value/2.54)-(n_feet*12)).toFixed(1);if(n_inches>=12.0){n_feet+=1
n_inches=n_inches-12.0}
document.getElementById('HeightFtIns').innerHTML=n_feet+'ft '+n_inches+'in';UpdateBMI();}
function updateWeight(theRef)
{var n_stone,n_pounds,n_totalpounds,n_value;n_value=document.getElementById('HiddenWeightKG').value;document.getElementById('WeightKG').innerHTML=n_value+'kg';n_totalpounds=n_value*2.2;n_stone=Math.round((n_totalpounds/14)-0.5);n_pounds=Math.round(n_totalpounds-(n_stone*14));if(n_pounds==14){n_stone+=1
n_pounds=0}
document.getElementById('WeightStLbs').innerHTML=Math.round(n_totalpounds)+'lbs ('+n_stone+'st '+n_pounds+'lbs)';UpdateBMI();}
function UpdateBMI()
{var n_KG,n_M,n_BMI,BMIbgColor,BMIimg;var WM_MIDBLUE='#c8d5fb'
var WM_TURQUOISE="#64b1b1"
var WM_MIDGREEN='#bae699'
var WM_CARAMEL='#ffdd44'
var WM_DKPINK='#ee6622'
var WM_DKPURPLE='#986fa5'
var WM_DKBLUE='#3a3d8c'
n_KG=document.getElementById('HiddenWeightKG').value;n_M=document.getElementById('HiddenHeightCM').value*0.01;n_BMI=(n_KG/(n_M*n_M)).toFixed(1);document.getElementById('ImageBMI').innerHTML=n_BMI;if(n_BMI<=18.5)
{BMIbgColor=WM_MIDBLUE;BMIimg='0';}
else if(n_BMI<=24.9)
{BMIbgColor=WM_MIDGREEN;BMIimg='1';}
else if(n_BMI<=29.9)
{BMIbgColor=WM_CARAMEL;BMIimg='2';}
else if(n_BMI<=39.9)
{BMIbgColor=WM_DKPINK;BMIimg='3';}
else if(n_BMI<=49.9)
{BMIbgColor='#ff4433';BMIimg='4';}
else
{BMIbgColor='#ff0000';BMIimg='5';}
document.getElementById('BMIMaleIMG').src='../Assets/Graphics/BMI/WM_BMI_Man_'+BMIimg+'_120x240.gif';document.getElementById('BMIFemaleIMG').src='../Assets/Graphics/BMI/WM_BMI_WoMan_'+BMIimg+'_120x240.gif';document.getElementById('TextBMI').style.color=BMIbgColor;document.getElementById('ImageBMI').style.color=BMIbgColor;}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
function toggleLayer(whichLayer){var elem,vis;if(document.getElementById)
elem=document.getElementById(whichLayer);else if(document.all)
elem=document.all[whichLayer];else if(document.layers)
elem=document.layers[whichLayer];vis=elem.style;if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined){if(elem.offsetWidth!=0&&elem.offsetHeight!=0)
vis.display='block';else
vis.display='none';}
if(vis.display==''||vis.display=='block')
vis.display='none';else
vis.display='block';}
function rotateSiblings(obj,millis){$(obj).fadeIn('slow',function(){if($(this).is(':first-child')){$(this).parent().children(':last-child').fadeOut('slow');}else{$(this).prev().fadeOut('slow');}
$(this).animate({opacity:1},millis,function(){if($(this).is(':last-child')){rotateSiblings($(this).parent().children(':first-child'),millis);}else{rotateSiblings($(this).next(),millis);}});});}
function slideUpSiblings(obj,millis){$(obj).css({opacity:0}).show().animate({top:0,opacity:1},'slow','easeInOutQuint',function(){window.setTimeout(function(){$(obj).animate({top:-$(obj).height(),opacity:0},'slow','easeInOutQuint',function(){$(obj).animate({top:$(obj).parent().height()},0).hide();if($(obj).is(':last-child')){slideUpSiblings($(obj).parent().children(':first-child'),millis);}else{slideUpSiblings($(obj).next(),millis);}});},millis);});}