// JavaScript Document

/*-------------- Lightbox ------------------*/

<!--  Activate Cloaking Device
//***************************************************************************
//
//                              Radio Button LeapTo I
//
//                 by Tim Wallace   (timothy@essex1.com)
//
//           Uses radio buttons in place of a drop-down menu.
//
//***************************************************************************
// Called by an onClick in each radio button.
function leapTo (link)
   {
   var new_url=link;
   if (  (new_url != "")  &&  (new_url != null)  )
      window.location=new_url;
   else
      alert("\nYou must make a selection.");
   }
// Called by View Source button - displays source of file.
function viewSource()
   {
   var current_url="";
   current_url=document.location;
   window.location="view-source:"+current_url;
   }
// Called by Full Window button - loads file to full window for easy saving.
function WinOpen() 
   {
   alert('\nPage will load to full screen.\n\nUse View/Document Source from menu bar to view source.\n\nUse File/Save As from menu bar to save.\n\nClose new window to return to this page. ');
   window.open("radioleap1.html","DisplayWindow","menubar=yes,scrollbars=yes");
   window.open("radioleap1.html","DisplayWindow","menubar=yes,scrollbars=yes");   // double for Macs
   }
// Deactivate Cloaking -->

//function hidediv() {
//if (document.getElementById) { // DOM3 = IE5, NS6
//document.getElementById('hideShow').style.visibility = 'hidden';
//}
//else {
//if (document.layers) { // Netscape 4
//document.hideShow.visibility = 'hidden';
//}
//else { // IE 4
//document.all.hideShow.style.visibility = 'hidden';
//}
//}
//}

//function showdiv() {
//if (document.getElementById) { // DOM3 = IE5, NS6
//document.getElementById('hideShow').style.visibility = 'visible';
//}
//else {
//if (document.layers) { // Netscape 4
//document.hideShow.visibility = 'visible';
//}
////else { // IE 4
//document.all.hideShow.style.visibility = 'visible';
//}
//}
//} 

var tickspeed=15000 //ticker speed in miliseconds (2000=2 seconds)
//var enablesubject=0 //enable scroller subject? Set to 0 to hide
var selectedDiv=0
var totalDivs=0

function contractall(){
var inc=0
while (document.getElementById("dropmsg"+inc)){
document.getElementById("dropmsg"+inc).style.display="none"
inc++
}
}


function expandone(){
var selectedDivObj=document.getElementById("dropmsg"+selectedDiv)
contractall()
//document.getElementById("dropcontentsubject").innerHTML=selectedDivObj.getAttribute("subject")
selectedDivObj.style.display="block"
selectedDiv=(selectedDiv<totalDivs-1)? selectedDiv+1 : 0
setTimeout("expandone()",tickspeed)
}

function startscroller(){
while (document.getElementById("dropmsg"+totalDivs)!=null)
totalDivs++
expandone()
//if (!enablesubject)
//document.getElementById("dropcontentsubject").style.display="none"
}

if (window.addEventListener)
window.addEventListener("load", startscroller, false)
else if (window.attachEvent)
window.attachEvent("onload", startscroller)




function validate_form ( )
{
    valid = true;

    if (( document.contact_form.checkered.checked == false ) || ( document.contact_form.results.checked == false ) || ( document.contact_form.others.checked == false ))
    {
        alert ( "Please check all boxes to continue." );
        valid = false;
    }


    return valid;
}

function on_check ()
{
	if ( validate_form() == true )
	{ 
		leapTo('http://174.120.225.126/~ioppolol/testimonials/');
	}
}
