

//Price Rotation Functions

 var headline_count;
 var headline_interval;
 var old_headline = 0;
 var current_headline = 0;


 $(document).ready(function(){
   headline_count = $("div.headline").size();
   $("div.headline:eq("+current_headline+")").css('top','0px');
 
   headline_interval = setInterval(headline_rotate,5000); //time in milliseconds
   $('#bannerPrices').hover(function() {
     clearInterval(headline_interval);
   }, function() {
     headline_interval = setInterval(headline_rotate,5000); //time in milliseconds
     headline_rotate();
   });
 });
 
 function headline_rotate() {
   current_headline = (old_headline + 1) % headline_count; 
   $("div.headline:eq(" + old_headline + ")").animate({top: -205},"slow", function() {
     $(this).css('top','210px');
   });
   $("div.headline:eq(" + current_headline + ")").show().animate({top: 0},"slow");  
   old_headline = current_headline;
 }


//Circuit Page Scroll functions
function nextPage(page, id, speed){
	$frame = $('#'+id);
	var distance = 675;
	var pos = (distance*page)+"px";
	$frame.scrollTo(pos,'0px',speed);
}
 
 
 
//RBC Pop Up functions 
/*
 function openSplashPage(lang) {
	 if(lang=='en'){
		 window.open("http://www.rbcinsurance.com/propertyandcasualty/travel/onlinesaleskit/splashpages/"+document.RBCI.SplashPage.value+".html?"+document.RBCI.Weblink.value,document.RBCI.PageTarget.value,"height="+document.RBCI.PageHeight.value+",width="+document.RBCI.PageWidth.value+",toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
		 }else{
window.open("http://www.rbcassurances.com/assurancededommages/voyage/troussedeventesenligne/pagessplash/"+document.RBCI.SplashPage.value+".html?"+document.RBCI.Weblink.value,document.RBCI.PageTarget.value,"height="+document.RBCI.PageHeight.value+",width="+document.RBCI.PageWidth.value+",toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes")
 }
 }

function showPopup(url) { 
	newwindow=window.open(url,'name','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=0,left=050,width='+x+',height='+y); 
	if (window.focus) {
		newwindow.focus()
	} 
} */
