//Function to show and hide the insurance type drop down options
function showHide(id)
{
	if(document.getElementById(id).style.display=='none')
	{
		document.getElementById(id).style.display='block';
	}else
	{
		document.getElementById(id).style.display='none';
	}
}

//Function to hide the insurance type drop down options when clicked anywhere in browser.
function hide_combo()
{
	document.getElementById('quotetype_list').style.display='none';
}

//Function to change insurance type when any particular insurance option is clicked.
function changeInsType(text,value,image,widget_title)
{	
	$('#quotetype_selected').text(" "+text);
	$('#quotetype_list').css('display','none');	
	
	$('#selInsuranceType').attr('value',value);
	
	var img_index = Math.floor(Math.random() * image.length);
	$('.widgetcontainer').css('background','transparent url('+image[img_index]+') no-repeat left top');
	
	$('#widget_title_txt').text(widget_title);
}

//Function to rotate affiliate images.
//Rotating Banner
function rotateBanner() {
	var objImage = document.getElementById('banner1');
	if(objImage == null) return;
	
	$('#banner1').fadeOut(2000,function()
	{
		objImage.src = banners[banner_no];
	});	
	$('#banner1').fadeIn(2000);
	
	/*$('#banner1').fadeTo(2000,0.1,function()
	{
		objImage.src = banners[banner_no];
	});	
	$('#banner1').fadeTo(2000,1);*/
		
	//banner_id_no++;	
	banner_no++;
	//if(banner_id_no == 4)
		//banner_id_no = 1;
	if(banner_no == banners.length)
		banner_no = 0;
}

//Function to change the Widget Photo when a new Insurance Type is selected from the drop down box
function changeInsImage(val)
{
	$('.widgetcontainer').css('background','transparent url('+val+') no-repeat left top');	
}

function close_and_sendback()
{
	self.close();
}

//#1635 START Code Added to protect the email address from email scraping robots!
function nqlwnrHdXKnMDkL()
{
/* Munged addy code - YOU CAN EDIT COMMENT THIS TAG BETWEEN THE TWO STARS */ 
var nTWgBLzlFoKUsOz=["99","108","105","101","110","116","115","x65","x72","118","105","99","x65","115","x40","x69","x71","117","x6f","x74","101","x78","x2e","x63","x6f","x6d"];
var PFODOuPWXCJkLyI=['?','s','u','b','j','e','c','t','='];
var zeUJBlQyiaslOYU=["x63","108","105","x65","x6e","x74","115","101","114","x76","105","x63","x65","x73","64","x69","x71","x75","x6f","116","x65","120","x2e","x63","x6f","109"];
document.write("<a href=\"&#x6d;&#x61;&#x69;&#x6c;&#x74;&#000111;&#00058;");
for (i=0; i<nTWgBLzlFoKUsOz.length; i++) document.write('&#'+nTWgBLzlFoKUsOz[i]+';');
for (i=0; i<PFODOuPWXCJkLyI.length; i++) document.write(PFODOuPWXCJkLyI[i]);
document.write('" style="" class="" id="">');
for (i=0; i<zeUJBlQyiaslOYU.length; i++) document.write('&#'+zeUJBlQyiaslOYU[i]+';');
document.write('</a>');
/* Munged addy code - YOU CAN EDIT COMMENT THIS TAG BETWEEN THE TWO STARS */
}

function objSqBgDhJzTCqA()
{
/* Munged addy code - YOU CAN EDIT COMMENT THIS TAG BETWEEN THE TWO STARS */ 
var aVCsvRXAGURROas=["x63","97","x72","x65","101","114","115","x40","x69","113","117","x6f","x74","x65","120","46","99","x6f","x6d"];
var jAHivsYfjsSJCcG=['?','s','u','b','j','e','c','t','='];
var VUsyVRTbcYzjXEv=["99","x61","114","101","101","114","x73","x40","x69","113","117","111","116","x65","120","x2e","99","111","x6d"];
document.write("<a href=\"&#x6d;&#00097;&#x69;&#000108;&#x74;&#x6f;&#58;");
for (i=0; i<aVCsvRXAGURROas.length; i++) document.write('&#'+aVCsvRXAGURROas[i]+';');
for (i=0; i<jAHivsYfjsSJCcG.length; i++) document.write(jAHivsYfjsSJCcG[i]);
document.write('" style="" class="" id="">');
for (i=0; i<VUsyVRTbcYzjXEv.length; i++) document.write('&#'+VUsyVRTbcYzjXEv[i]+';');
document.write('</a>');
/* Munged addy code - YOU CAN EDIT COMMENT THIS TAG BETWEEN THE TWO STARS */
}
//#1635 END Code Added to protect the email address from email scraping robots!

