


function startRoadblock() {
	
	
	var portalHeight = 0;
	
	// let the dom rest for ie6's sake
	$("#roadblock-android").animate({
		opacity: 0
	}, 750, function() {
		
		// the below is related to the fact that we're using jquery 1.2.1 which miscalculates $(document).height() -- this is another way of getting document height
		var pagebody = document.body, pagehtml = document.documentElement;
		var docHeight = Math.max( pagebody.scrollHeight, pagebody.offsetHeight, pagehtml.clientHeight, pagehtml.scrollHeight, pagehtml.offsetHeight );

		if($("body").hasClass("ie6")) {
			portalHeight = document.documentElement.clientHeight;
		} else {
			portalHeight = $(window).height();
		}
		
		$("#roadblock_overlay").css("height", docHeight + "px");
		$("#roadblock_overlay-inner").css("marginTop", ((portalHeight - 550) / 2 ) + "px");
		
		$("#roadblock-android").css("opacity", 1).fadeIn(750, function() {
			$("#roadblock-prevails").fadeIn(750, function() {
				$("#roadblock-phone").fadeIn(1000, function() {
					$("#roadblock-copy").fadeIn(1000, function() {
						$(this).animate({
							opacity: 1
						}, 3000, function() {
							$("#roadblock_overlay").find("img").fadeOut(750, function() {
									$("#roadblock_overlay").fadeOut(750);
							});
					  });
					});
				});
			});
		});
	});
}




/******************/

/* image toogle */

/******************/



 function startmenu()

  {

	for (var k=0; k < 4; k++) {

		if (document.getElementById("menu" + k) != null) {

			document.getElementById("menu" + k).style.display = "none";

		}

		if (document.getElementById("pic" + k) != null) {

			document.getElementById("pic" + k).style.display = "none";

		}

		if (document.getElementById("hideDiv" + k) != null) {

			document.getElementById("hideDiv" + k).style.display = "block";

		}

	}

  }



  function menu0func()

  {

  	if(document.getElementById("menu0").style.display == "none")

  	{

  		startmenu();

  		document.getElementById("menu0").style.display = "block";

		document.getElementById("pic0").style.display = "block";

		document.getElementById("hideDiv0").style.display = "none";

  	}

	

	else 

  	{

  		startmenu();

		document.getElementById("hideDiv0").style.display = "block";

  	}

  	

  }

  

  function menu1func()

  {

  	if(document.getElementById("menu1").style.display == "none")

  	{

  		startmenu();

  		document.getElementById("menu1").style.display = "block";

		document.getElementById("pic1").style.display = "block";

		document.getElementById("hideDiv1").style.display = "none";

  	}

	

	else if(document.getElementById("menu1").style.display == "block")

  	{

  		startmenu();

		document.getElementById("hideDiv1").style.display = "block";

  	}

  	

  }

  

  function menu2func()

  {

  	if(document.getElementById("menu2").style.display == "none")

  	{

  		startmenu();

  		document.getElementById("menu2").style.display = "block";

		document.getElementById("pic2").style.display = "block";

		document.getElementById("hideDiv2").style.display = "none";

  	}

	

	else if(document.getElementById("menu2").style.display == "block")

  	{

  		startmenu();

		document.getElementById("hideDiv2").style.display = "block";

  	}

	

  }

  

  function menu3func()

  {

  	if(document.getElementById("menu3").style.display == "none")

  	{

  		startmenu();

  		document.getElementById("menu3").style.display = "block";

		document.getElementById("pic3").style.display = "block";

		document.getElementById("hideDiv3").style.display = "none";

  	}

	

	else if(document.getElementById("menu3").style.display == "block")

  	{

  		startmenu();

		document.getElementById("hideDiv3").style.display = "block";

  	}

  	

  }



/*************************/

/* rates toggle arrow */

/*************************/



var BOOST = {

	

	init : function(){



		$('div.color-white-boxes dd').hide();

	  

		$('div.color-white-boxes dt').click(function(){

			if ($(this).hasClass('expanded')) {

				$(this).removeClass('expanded').next().hide();

			}

			else{

				$(this).addClass('expanded').next().show();	

			}

		});

		

		$('div.unlimited_view_plan_details img').click( function(){

			$('div.rates-overlay').slideToggle();

		});

		

		$('div.rates-overlay img').click( function(){

			$('div.rates-overlay').slideUp();

		});

		

	} // end of init()	

		

};



// pla feature and highlights

var Feature = {

	

	init : function(){



		$('div.item_list dd').hide();

	  

		$('div.item_list dt').click(function(){

			if ($(this).hasClass('expanded')) {

				$(this).removeClass('expanded').next().hide();

			}

			else{

				$(this).addClass('expanded').next().show();	

			}

		});

		

		

	} // end of init()	

		

};













/*****

* Ajax Methods

*/





var resultPlan;



function getdata(){

    ZipCodeWebService.GetArea("021", onSuccess)

    

}



function onSuccess(result){

   

   resultPlan = result;

   

   var i =0;

   for(var x in result){

        $get("ResultDiv").innerHTML += (result[i].PlanId + " " +result[i].Name+ '<br />');

        i++;

   }

    

}



/*

* This is the email notification stub call the function with zipcode and email

*/

function saveEmail(){

    EmailWebService.SaveEmail(zipcode, email);

}

function updateLinks() {
	jQuery('.clickable').click( function() {
		var href = $(this).find('a').attr('href')															 
		document.location = href;
	})
	jQuery('.mouseout').hover( function() {
		$(this).removeClass('mouseout').addClass('mouseover');
	}, function() {
		$(this).removeClass('mouseover').addClass('mouseout');
	})
}


