function makeRound(){
var els = document.getElementsByTagName('div'); 
for(var i=0; el=els[i]; i++) if(el.className.indexOf('round')>-1 && el.firstChild && el.firstChild.className!='t') el.innerHTML = '<b class="t"><b class="r"></b></b><div class="c"><b class="br"></b>'+el.innerHTML+'<b class="br"></b></div><b class="b"><b class="r"><!----></b></b>';
	}

//window.onload = makeRound;
//window.onload = adjustsHeights;

function adjustsHeights(){
	
var the_heightT=document.getElementById('theText').offsetHeight;
var the_height=document.getElementById('navigation').offsetHeight;
var contentWrapper_height=document.getElementById('bodyTextWrapper').offsetHeight;
//alert(contentWrapper_height);
//alert(the_heightT);
	if(contentWrapper_height>477){
		//alert("1");
		document.getElementById('navigation').style.height=contentWrapper_height-160+"px";
	}
	//var the_height=document.getElementById('theText').offsetHeight;
	if(contentWrapper_height<=477){
		//alert("2");
		document.getElementById('theText').style.height=477+"px";
	}
	
}

function checkSecurity(){
  Form_Security_Code=document.getElementById('Form_Security_Code').value;
   hiddenSC=document.getElementById('hiddenSC').value;
   if(Form_Security_Code!=hiddenSC){
  // window.location.reload(true);
   //window.location = "http://johnlindberg.com/contact.html"
    alert("The Security Code you entered did not match, please try again");
   }
   else{
	    document.getElementById('myForm').submit();
	
   }
   
  }
 function showSecurityCode(){
	var chars = "123456789";
	var string_length = 5;
	var randomstring = '';
	for (var i=0; i<string_length; i++) {
		var rnum = Math.floor(Math.random() * chars.length);
		randomstring += chars.substring(rnum,rnum+1);
	}
//document.getElementById('hiddenSC').value =randomstring;
 /*document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="92"'); document.write('height="23" NAME="movie">');
document.write('<param name="movie" value="attached/securityCode.swf" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="wmode" value="transparent" />');
document.write('<param name="FlashVars" value="mySecurityCode='+randomstring+'" />');
document.write('<embed src="attached/securityCode.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"'); 
document.write('type="application/x-shockwave-flash" width="92" height="23"  wmode="transparent" FlashVars="mySecurityCode='+randomstring+'"></embed>');
document.write('</object>');*/
	document.write('<div id="securityCode" ><strong>'+randomstring+'</strong></div>');
	document.write('<input name="hiddenSC" type="hidden" id="hiddenSC" value="'+randomstring+'" />');
}


mainNavHover = function() {
	var sfEls = document.getElementById("navigation").getElementsByTagName("LI");
	
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" over";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" over\\b"), "");
		}
	}
}