//random header images
var noOfMastheadImages = 30;

//returns random number inbetween 1 and nMax
function returnRandom(nMax){
	var ran_number=Math.ceil(Math.random()*nMax); 
	return ran_number;
}

//rollover function
function swapImage(obj,state){
	var imgSrc = '';
	if(state=='on'){
		imgSrc = obj.src.replace('.gif','_on.gif');
	}
	else{
		imgSrc = obj.src.replace('_on.gif','.gif');
	}
	obj.src = imgSrc;
}

function highlightImage(obj_name){
	var obj = document.getElementById(obj_name);	
	var imgSrc = '';
	imgSrc = obj.src.replace('.gif','_on.gif');
	obj.src = imgSrc;
}


//highlites nav for current section
function initNav(){
	if(navSection){
		var img = document.images[navSection];
		img.onmouseover = new Function ("", "");
		img.onmouseout = new Function ("", "");
		img.src = 'images/' + navSection + '_on.gif';
		
	}
}

//display random image
function displayMastHead(){
	document.write('<img src="images/header_' + returnRandom(noOfMastheadImages) + '.jpg" width="482" height="149" alt="" border="0">');
}

function displayRandomQuote(){
	
	/*
	 var students = new Array(6);
     students[0] = '<div id="randomQuote">"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."</div><br/>John Smith<br/>Ceo, XYZ Company';
     students[1] = 'This is Quote 2. This is Quote 2. This is Quote 2. This is Quote 2.';
     students[2] = 'This is Quote 3. This is Quote 3. This is Quote 3. This is Quote 3.';
     students[3] = 'This is Quote 4. This is Quote 4. This is Quote 4. This is Quote 4.';
     students[4] = 'This is Quote 5. This is Quote 5. This is Quote 5. This is Quote 5.';
     students[5] = 'This is Quote 6. This is Quote 6. This is Quote 6. This is Quote 6.';

 	var ran_number=Math.ceil(Math.random()*6)
	document.write(students[ran_number-1]);	
	

	
		
	
	document.write('<p class="header">About LiveVox</p><p>Since 1999, LiveVox has paced development of high-powered debt management call center technology<br /><a href="about_livevox.asp">Learn More</a></p>')
	*/
	document.write("<p class='headerNoTitle' style='font-weight:bold;'><span style='color:#076AAD;'>LiveVox</span> offers the only SIP-based, on-demand, integrated voice applications (<a href='vp_outbound_contact.asp'>Outbound</a>, <a href='vp_inbound_contact.asp'>Inbound</a> and Automated Call Distributor) solution for contact centers.</p>")


}

// preload rolover images
if (document.images){
	var the_images = new Array('nav_home_on.gif','nav_about_on.gif','nav_contact_us_on.gif','nav_client_results_on.gif','nav_customer_login_on.gif','nav_live_demo_on.gif','nav_news_events_on.gif','nav_search_on.gif','nav_services_on.gif');
	preloadImages(the_images);
}

function preloadImages(the_images_array) {
	for(loop = 0; loop < the_images_array.length; loop++){
		var an_image = new Image();
		an_image.src = the_images_array[loop];
	}
}

function clearForm(){
var f = document.contact_us;
var aFields = new Array('first','last','email','company_name','address1','address2','city','state','zip','phone_day','comment');
for(i=0;i<aFields.length;i++){
	f[aFields[i]].value = '';
}
f.response_type[0].checked=true;
}

function newWindow(thePage)
{
	window.open(thePage,'LiveVox','width=800,height=600,resizable=yes');
} 

