// JavaScript Document

var nicked="none"; var glare=""
var shineLength=shineArray.length   

	function f_Mover (name){
		window.document.images[name].src =  "images/" + name + "_dwn.jpg";
		}

	function f_Mout (name){
		window.document.images[name].src =  "images/" + name + "_up.jpg";
		}

  	function nukem(){
	   for(i=0; i<shineArray.length; i++){	      
		   eval('document.getElementById("div_'+shineArray[i]+'").style.display=nicked'); 					   
		}
	  }
	  
	function sickem(){
	   for(i=1; i<shineArray.length; i++){
		   eval('document.all.div_'+shineArray[i]+'.style.display=nicked')  				   
		}
	  }
	  
	  function glarem(){
	   for(i=1; i<shineArray.length; i++){
		   eval('document.all.div_'+shineArray[i]+'.style.display=glare')  				   
		}
	  }
	  
	function downem(){
	   for(i=0; i<shineArray.length; i++){
		 name= 'tb_' + shineArray[i]
		 window.document.images[name].src = 'images/' + name + '_dwn.gif';
		 name = ''
		}		
	}
	   
	function svicche(consort, imgname){
	    //alert("they were hit!");
		nukem();
		//alert("they were nuked!");
		downem();
		//alert("they were downed!");
		eval('document.getElementById("'+consort+'").style.display=glare'); 
		window.document.images[imgname].src = "images/" + imgname + "_up.gif";			
		
	}
	
	function showem(consort){
		
			if (eval('document.all.'+consort+'.style.display')==''){
				eval('document.all.' + consort + '.style.display=nicked')
			}
			else{
				eval('document.all.' + consort + '.style.display=glare')		
			}
			
		}
		
		
	function circle(){
	
	        var r=document.form1.inchdiameter.value/24;

	        document.form1.full.value = Math.round(r*r*3.1416*100)/100;
	        
	        document.form1.fulltile.value = Math.round(r*r*3.1416*218);
	        document.form1.fulltilemini.value = Math.round(r*r*3.1416*729);
        	
	        document.form1.fulltilelbs.value = Math.round(r*r*3.1416*218/72);
	        document.form1.fulltileminilbs.value = Math.round(r*r*3.1416*729/270);
        	
        	
	        document.form1.fulltile58.value = Math.round(r*r*3.1416*400);
	        document.form1.fulltile58lbs.value = Math.round(r*r*3.1416);
    }

    function rectangle(){
                
	        var l=document.form1.rlength.value/12;
	        var w=document.form1.rwidth.value/12;
	        
	        document.form1.rarea.value = Math.round(l*w*100)/100;
	        
	       // alert("area= " + Math.round(l*w*100)/100 );
	        
	        document.form1.rtile.value = Math.round(l*w*218);	
	        document.form1.rtilelbs.value = Math.ceil(l*w*1.514*2);
            //alert("3/4 filled");
	        
	        document.form1.rtilemini.value = Math.round(l*w*729);	
	        document.form1.rtileminilbs.value = Math.ceil(l*w*1.215*2);
	        
        	//alert("3/8 filled");
        	
	        document.form1.rtile58.value = Math.round(l*w*400);	
	        document.form1.rtile58lbs.value = Math.ceil(l*w*100)/100;
	        
	        //alert("5/8 filled");
    }

    function triangle(){
       
	        var h=document.form1.theight.value/12;
	        var b=document.form1.tbase.value/12;
	        document.form1.tarea.value = Math.round(.5*b*h*100)/100;
	        
	        document.form1.ttile.value = Math.round(.5*b*h*218);
	        document.form1.ttilelbs.value = Math.ceil(b*h*.76*2);
	        
	        document.form1.ttilemini.value = Math.round(.5*b*h*729);
	        document.form1.ttileminilbs.value = Math.ceil(b*h*.61*2);
        	
        	
	        document.form1.ttile58.value = Math.round(.5*b*h*400);	
	        document.form1.ttile58lbs.value = Math.ceil(.5*b*h*100)/100;
      }
      
    function divAreaClick(url){
        window.location = url
    }