window.addEvent('domready', function(){

	var footer = $('footer');
	    // Put the footer at the bottom of the window and pin it there
	    window.addEvent('resize', function() {
	     footer.unpin();
	        footer.position({'ignoreMargins':true,
	                         'position':'topLeft',
	                         'offset':{'x':0, 'y':window.getSize().y-footer.getSize().y + 15}});
          footer.pin();         
		var mb = $$('.main_body_content');
	if (mb.length > 0) {   
	 	mb = mb[0];    
	} else { 
		mb = $('doc')
		
	}
	  mb.setStyle("min-height", window.getSize().y-footer.getSize().y)
    // Make sure the content of the page doesn't get covered by the footer
	    });
	    window.fireEvent('resize');
 		    //document.body.set('styles', {'margin-bottom':footer.getSize().y});
     //  new OverText($('search')) ;
                
 //alert("yes")

     var bb_flashvars = {} ;
     var bb_params = {'wmode':'transparent'} ;
     var bb_attributes = {'wmode':'transparent'} ;

	// home flash element top
	if ($chk($('home_flashelem'))) swfobject.embedSWF("/assets/media/billboard.swf", "home_flashelem", "788", "268", "9.0.0", '', bb_flashvars, bb_params, bb_attributes);
	                                                                                   
	// home flash elem - logo rotation
   if ($chk($('logorot'))) {
   swfobject.embedSWF("/assets/media/logoRotator.swf", "logorot", "700", "80", "9.0.0", '', lr_flashvars, lr_params, lr_attributes);    
}
	var myMenu = new MenuMatic();  
    var el = 'htest_1' ;
    var el2 = 'htest_2' ;  
   // autofadetestimonials()

	if ($chk($(el)) && $chk($(el2))) {
	   var func=function(){
			autofadetestimonials();
		}
		func.periodical(10000);
	} else if ($chk($(el))) {
		autofadetestimonials(); 
	}
})   
 
var ts = 0;  
var ots;

function autofadetestimonials(){  
	ots=ts
 	ts++;  
	var oel = 'htest_'+ots ; 
	var el = 'htest_'+ts ;
	if (!$chk($(el))) {
		ts=1;
	   el = 'htest_'+ts ;
	}                       
	
	$(el).fade('in');
	//alert($(el)+" -- "+$(oel))    
	
	
	if ($chk($(oel))) {
 		$(oel).fade('out');
   }
	
	
}     

    //  $chk($('first_name'))

function validate(f)
{                 
	var theForm = document.salesForm;
	var valid = true;
	var message = "";

	if(theForm.first_name.value.length < 1) {
		valid = false;
		message += "First name is required.<br />";
	}
	if(theForm.last_name.value.length < 1) {
		valid = false;
		message += "Last name is required.<br />";
	}
	if(theForm.title.value.length < 1) {
		valid = false;
		message += "Title is required.<br />";
	}
	if(theForm.company.value.length < 1) {
		valid = false;
		message += "Company name is required.<br />";
	}
	if(theForm.email.value.length < 1) {
		valid = false;
		message += "Email address is required.<br />";
	}
	if(theForm.industry != null) {
		if(theForm.industry.value == "") {
			valid = false;
			message += "Industry is required.<br />";
		}
	}  
	if(!valid) {
		var div = document.getElementById("error");
		div.innerHTML = message;
	}

	return valid;
}

﻿﻿function freetrialvalidate()
{
	var theForm = document.salesForm;
	var valid = true;
	var message = "";
	
	if(theForm.first_name.value.length < 1) {
		valid = false;
		message += "First name is required.<br />";
	}
	if(theForm.last_name.value.length < 1) {
		valid = false;
		message += "Last name is required.<br />";
	}
	if(theForm.title.value.length < 1) {
		valid = false;
		message += "Title is required.<br />";
	}
	if(theForm.phone.value.length < 1) {
		valid = false;
		message += "Phone number is required.<br />";
	}
	if(theForm.email.value.length < 1) {
		valid = false;
		message += "Email address is required.<br />";
	}
	if(theForm.company.value.length < 1) {
		valid = false;
		message += "Company name is required.<br />";
	}
	if(theForm.state.value.length < 1) {
		valid = false;
		message += "State/Province is required.<br />";
        }
	if(theForm.industry != null) {
		if(theForm.industry.value == "") {
			valid = false;
			message += "Industry is required.<br />";
		}
	}
	if(!valid) {
		var div = document.getElementById("error");
		div.innerHTML = message;
	}
	
	return valid;
}
function supportValidate()
{
	var formName = document.LoginForm;
	var valid = true;
	
	if(formName.un.value.length < 1)
	{
		alert("Please supply a username.");
		valid = false;
	}
	if(formName.pw.value.length < 1)
	{
		alert("Please supply a password.");
		valid = false;
	}
	
	if(valid == true)
	{
		// Hide Form
		document.getElementById("LoginForm").style.display = 'none';
		
		// Show iFrame
		document.getElementById("myIFRAME").style.display = 'block';
	}
	
	return valid;
}
