// JavaScript Document
function adjustHeights(){
	
	 var the_height=document.getElementById('textArea').offsetHeight;
		
		if (the_height<416){
			the_height=416;
		}
		document.getElementById('contentWrapper').style.height=the_height+20+"px";
		document.getElementById('flashArea').style.height=the_height+20+"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(false);
   //window.location = "http://johnlindberg.com/contact.html"
    alert("The Security Code you entered did not match, please try again");
   }
   
  }
  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="includes/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="includes/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>');}