/*
	SITE PLATFORM v1.3
	built by AntalMedia (www.antalmedia.com)
	built on Mootools v1.11 (http://www.mootools.net)
	
	copyright 2007. all rights reserved.
	
	HOW TO ADD TO THE SITE OBJECT
	Object.extend(Site, {
		added_function: function() {
			alert('added');
		}
	});
		
*/

var small_a		= '';
var medium_a	= '';
var large_a		= '';
var font_tags	= '';

var subnavArray = ['client','what_is_a_captive'];
var slides = ['client','what_is_a_captive'];
var navState = {"client": false,"what_is_a_captive": false};

var slideSpeed = 200;
var closeDelay = 500;

var questionBox;
var answerBox;
var qaBoxes;
var changeQint;

var background_img;
var text_img;
var text_img_y;

var anchorScroll;

var fxQ;
var fxA;
var fxChain;

var yaht_img;
var yahtEffect;
var yahtEffectFade;

var img_swap = new Object;

var Site = {
	
	pageDomReady: function() {
		
		anchorScroll = new Fx.Scroll(window);
		Site.setupQuestion();
		Site.blurAllLinks();
		Site.setupToolTips();
	},
	pageLoaded: function () {
		Site.slideSubNav();
		Site.loadMiddlePhoto();
		Site.loadSSP();
	//	Site.loadInroSound();
		Site.setFontSize();
		//Site.setupHomeYaht();
		Site.scrollCheck();
		Site.loadVideoPlayer();
		Site.loadMiniVideoPlayer();
		Site.setupAjaxNews();
		setTimeout (Site.loadHomeMiddlePhoto, 1500);
		//setTimeout (Site.setupNewsArticlesScroll, 10000);
	},
	preloadImages: function () {
		var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=Site.preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	},
	swapImage: function(el,src) {
		var img = $(el);
		img.setProperty('orig_src',img.getProperty('src'));
		img.setProperty('src',src);
	},
	restoreImage: function(el) {
		var img = $(el);
		img.setProperty('src',img.getProperty('orig_src'));
	},
	scrollCheck: function() {
		if ( $('scrollsTo') && $('scrollsTo').value ) Site.scrollsTo($('scrollsTo').value);
	},
	setupToolTips: function() {
		var Tips2 = new Tips($$('.enableToolTip'), {
			initialize:function(){
				this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
			},
			onShow: function(toolTip) {
				this.fx.start(1);
			},
			onHide: function(toolTip) {
				this.fx.start(0);
			}
		});
	},
	loadMiddlePhoto: function () {
		if ($('middle_photo')) {
			$('middle_photo').addEvent('click', function() {
				Site.loadMiddlePhoto();
			});
			
			var flashcheckObj = new SWFObject("", "check", "", "", "9", "#FFFFFF", true);
			if (flashcheckObj.installedVer.major >= "9") {
				flashHeaderObj = new SWFObject("/lib/swf/risk.swf", "billboardflash", "740px", "110px", 9, "#ffffff", true);
				flashHeaderObj.addParam("wmode", "transparent");
				flashHeaderObj.addParam("salign", "tl");
				flashHeaderObj.addParam("scale", "noscale");
				flashHeaderObj.write("middle_photo");
			}
		}
	},
	loadSSP: function () {
		if ($('ssp')) {
			var flashcheckObj = new SWFObject("", "check", "", "", "9", "#FFFFFF", true);
			if (flashcheckObj.installedVer.major >= "9") {
				flashHeaderObj = new SWFObject("/lib/swf/ssp.swf", "billboardflash", "300px", "200px", 9, "#ffffff", true);
				flashHeaderObj.addParam("wmode", "transparent");
				flashHeaderObj.addParam("salign", "tl");
				flashHeaderObj.addParam("scale", "noscale");
				flashHeaderObj.addVariable("xmlFile", xmlFile);
				flashHeaderObj.addVariable("lgPath", lgPath);
				flashHeaderObj.addVariable("tnPath", tnPath);
				if ( $('about_ssp_img') ) $('about_ssp_img').setOpacity(0);
				flashHeaderObj.write("ssp");
			}
		}
	},
	loadHomeMiddlePhoto: function () {
		if ( $('home_middle_photo') ) {
			var flashcheckObj = new SWFObject("", "check", "", "", "9", "#FFFFFF", true);
			if (flashcheckObj.installedVer.major >= "9") {
				var HomeSoundCheck = Cookie.get("HomeSoundCheck");
				//
				flashHeaderObj = new SWFObject("/lib/swf/home_risk.swf", "billboardflash", "678px", "220px", 9, "#ffffff", true);
				flashHeaderObj.addParam("wmode", "transparent");
				flashHeaderObj.addParam("salign", "tl");
				flashHeaderObj.addParam("scale", "noscale");
				flashHeaderObj.addVariable("HomeSoundCheck", HomeSoundCheck);
				flashHeaderObj.write("home_middle_photo");
				//
				Cookie.set('HomeSoundCheck', '100');
			}
		}
	},
	loadInroSound: function() {
		
		if ( $('introSound') ) {
			
			var flashcheckObj = new SWFObject("", "check", "", "", "9", "#FFFFFF", true);
			if (flashcheckObj.installedVer.major >= "9") {
				flashHeaderObj = new SWFObject("/lib/swf/introSound.swf", "swfIntroSound", "1px", "1px", 9, "#ffffff", true);
				flashHeaderObj.addParam("wmode", "transparent");
				flashHeaderObj.addParam("salign", "tl");
				flashHeaderObj.addParam("scale", "noscale");
				flashHeaderObj.write("introSound");
			}
		}
	},
	/*************************************|VIDEO LIBRARY|*******************************************/
	loadVideoPlayer: function () {
		if ( $('video_library_box_1') ) {
			var so = new SWFObject('/lib/swf/480_swf_player.swf','mpl','496','338','9');
			so.addParam("wmode", "transparent");
			so.addParam("scale", "noscale");
			so.addVariable('swf_file',swf_file);
			if (text_img) so.addVariable('text_img',text_img);
			so.write('video_library_box_1');
			
		}
	},
	loadVideoPlayerAutoPlay: function () {
		if ( $('video_library_box_1') ) {
			var so = new SWFObject('/lib/swf/480_swf_player.swf','mpl','496','338','9');
			so.addParam("wmode", "transparent");
			so.addParam("scale", "noscale");
			so.addVariable('swf_file',swf_file);
			//so.addVariable('isAutoPlay','true');
			if (text_img) so.addVariable('text_img',text_img);
			//if (text_img_y) so.addVariable('text_img_y',text_img_y);
			so.write('video_library_box_1');
		}
	},
	/*************************************|CONTENT PAGES|*******************************************/
	loadMiniVideoPlayer: function() {
		if ( $('video_mini_player') ) {
			//var so = new SWFObject('/lib/swf/340_flv_player.swf','mp1','340','230','9');
			var so = new SWFObject('/lib/swf/340_swf_player.swf','mp1','340','220','9');
			so.addParam("wmode", "transparent");
			so.addParam("scale", "noscale");
			so.addVariable('swf_file',swf_file);
			if (text_img) so.addVariable('text_img',text_img);
			so.write('video_mini_player');
			
		}
		if ( $('video_mini_player_2') ) {
			var so = new SWFObject('/lib/swf/340_swf_player.swf','mp2','340','220','9');
			so.addParam("wmode", "transparent");
			so.addParam("scale", "noscale");
			so.addVariable('swf_file',swf_file_2);
			if (text_img_2) so.addVariable('text_img',text_img_2);
			so.write('video_mini_player_2');
		}
	},
	loadWelcomeVideo: function() {
		clearInterval(changeQint);
		/*
		flashHeaderObj = new SWFObject("/lib/swf/340-video.swf", "videoplayer", "350px", "235px", 9, "#ffffff", true);
		flashHeaderObj.addParam("wmode", "transparent");
		flashHeaderObj.addParam("salign", "tl");
		flashHeaderObj.addParam("scale", "noscale");
		flashHeaderObj.addVariable("xmlFile", xmlFile);
		flashHeaderObj.addVariable("lgPath", "lgPath=/lib/videos/welcome");
		flashHeaderObj.addVariable("tnPath", "tnPath=/lib/videos/welcome");
		flashHeaderObj.addVariable("background_img", "/lib/videos/welcome/01_welcome-Karl-340.jpg");
		flashHeaderObj.addVariable("text_img", "/lib/videos/karl.png");
		flashHeaderObj.write("home_q_a_box");
		*/
		var so = new SWFObject('/lib/swf/340_swf_player.swf','mp2','340','220','9');
		so.addParam("wmode", "transparent");
		so.addParam("scale", "noscale");
		so.addVariable('text_img',"/lib/videos/karl.png");
		so.addVariable('swf_file',"/lib/swf/01_welcome.swf");
		so.addVariable('isAutoPlay','true');
		so.write('home_q_a_box');
		
		$('home_middle_photo').setStyle( 'width', '643px' );
		$('home_q_a_box').setStyle( 'background', 'none' );
		$('home_q_a_box').setStyle( 'background-color', '#000000' );
		$('home_q_a_box').setStyle( 'width', '344px' );
		$('home_q_a_box').setStyle( 'padding-left', '2px' );
		$('home_q_a_box').setStyle( 'padding-top', '2px' );
		$('home_q_a_box').setStyle( 'height', '218px' );
		$('home_play_welcome_video').setStyle( 'right', '5px' );
		$('home_play_welcome_video').setStyle( 'top', '10px' );
		$('home_play_welcome_video').innerHTML = '<a href="#" onclick="Site.unloadWelcomeVideo(); return false;"><img src="/lib/images/close_button.jpg" alt="" /></a>';
	},
	unloadWelcomeVideo: function() {
		$('home_middle_photo').setStyle( 'width', '678px' );
		$('home_q_a_box').setStyle( 'background-image', 'url(/lib/images/q_a_bg.jpg)' );
		$('home_q_a_box').setStyle( 'background-position', 'left top' );
		$('home_q_a_box').setStyle( 'background-repeat', 'no-repeat' );
		$('home_q_a_box').setStyle( 'width', '307px' );
		$('home_q_a_box').setStyle( 'padding-left', '0px' );
		$('home_q_a_box').setStyle( 'padding-top', '0px' );
		$('home_play_welcome_video').setStyle( 'top', '22px' );
		$('home_play_welcome_video').setStyle( 'right', '339px' );
		$('home_q_a_box').setStyle( 'height', '220px' );
		$('home_play_welcome_video').innerHTML = '';
		$("home_q_a_box").innerHTML = '<div id="question_box">My business pays over $1 million in insurance premiums annually, with few claims</div><div id="answer_box">Pay insurance premiums to your captive, retain the underwriting profit and investment income</div><div id="more_q_a_link"><a href="javascript:;" onclick="Site.toggleAllQA();">more Q &amp; A ...</a></div>';
		Site.setupQuestion();
	},
	sspLoadImage: function(imgNum) {
		if ( imgNum == 1 ) {
			text_img = "/lib/videos/karl.png";
			swf_file = "/lib/swf/01_welcome_480.swf";
			background_img = "/lib/videos/welcome_480/01_welcome-Karl-480.jpg";
		} else if ( imgNum == 2 ) {
			text_img = "/lib/videos/james.png";
			swf_file = "/lib/swf/02_captive_480.swf";
			background_img = "/lib/videos/captive_management_480/02_captive-Jim-480.jpg";
		} else if ( imgNum == 3 ) {
			text_img = "/lib/videos/karl.png";
			swf_file = "/lib/swf/03_solutions_480.swf";
			background_img = "/lib/videos/alternative_risk_480/03_solutions-Karl-480.jpg";
		} else if ( imgNum == 4 ) {			
			text_img = "/lib/videos/james.png";
			swf_file = "/lib/swf/04_basics_480.swf";
			background_img = "/lib/videos/captive_basics_480/04_basics-Jim-480.jpg";
		} else if ( imgNum == 5 ) {
			text_img = "/lib/videos/ken.png";
			flv_src = "/lib/videos/growth_480/05_growth-Ken-480.flv";
			swf_file = "/lib/swf/05_growth_480.swf";
			background_img = "/lib/videos/growth_480/05_growth-Ken-480.jpg";
		} else if ( imgNum == 6 ) {
			text_img = "/lib/videos/holly.png";
			swf_file = "/lib/swf/06_types_480.swf";
			background_img = "/lib/videos/types_480/06_types-Holly-480.jpg";
		} else if ( imgNum == 7 ) {
			text_img = "/lib/videos/merilee.png";
			swf_file = "/lib/swf/07_domicile_480.swf";
			background_img = "/lib/videos/domicile_480/07_domicile-Merilee-480.jpg";
		} else if ( imgNum == 8 ) {
			text_img = "/lib/videos/karl.png";
			swf_file = "/lib/swf/08_why_480.swf";
			background_img = "/lib/videos/why_form_480/08_why-Karl-480.jpg";
		} else if ( imgNum == 9 ) {
			text_img = "/lib/videos/james.png";
			swf_file = "/lib/swf/09_hidden_480.swf";
			background_img = "/lib/videos/hidden_risk_480/09_hidden-Jim-480.jpg";
		} else if ( imgNum == 10 ) {
			text_img = "/lib/videos/derek.png";
			swf_file = "/lib/swf/10_reduce_480.swf";
			background_img = "/lib/videos/reduce_480/10_reduce-Derek-480.jpg";
		} else if ( imgNum == 11 ) {
			text_img = "/lib/videos/james.png";
			swf_file = "/lib/swf/11_taxation_480.swf";
			background_img = "/lib/videos/taxation_480/11_taxation-Jim480.jpg";
		} else if ( imgNum == 12 ) {
			text_img = "/lib/videos/ken.png";
			swf_file = "/lib/swf/12_advisors_480.swf";
			background_img = "/lib/videos/trusted_advisors_480/12_advisors-Ken-480.jpg";
		} else if ( imgNum == 13 ) {
			text_img = "/lib/videos/merilee.png";
			swf_file = "/lib/swf/13_about_480.swf";
			background_img = "/lib/videos/about_tribeca_480/13_about-Merilee-480.jpg";
		}
		
		Site.loadVideoPlayerAutoPlay();
	},
	VideoLibraryTxt: function(txt) {
		$('video_caption_txt').innerHTML = video_txt_arr[txt];
	},
	thisMovie: function(movieName) {
		if (navigator.appName.indexOf("Microsoft") != -1) {
			return window[movieName]
		} else {
			return document[movieName]
		}
	},
	setupHomeYaht: function() {
		yaht_img = $('yaht_img');
		if (yaht_img) {
			yahtEffect = yaht_img.effect('margin-left', {duration: 2000, transition: Fx.Transitions.Quad.easeInOut});
			yahtEffectFade = yaht_img.effect('opacity', {duration: 2000, transition: Fx.Transitions.linear});
			//yahtEffect.start(-280, 0).chain(function() {Site.loadHomeMiddlePhoto()});
			var intYahtDelay = setInterval(function() { clearInterval(intYahtDelay); Site.fadeinYaht(); }, 3000);
		}
	},
	fadeinYaht: function() {
		yahtEffectFade.set(0);
		yaht_img.setStyle('display', 'inline');
		Site.thisMovie("swfIntroSound").startSound();
		yahtEffectFade.start(0,1);
		var intYahtDelay = setInterval(function() { clearInterval(intYahtDelay); Site.startYaht(); }, 2000);
	},
	startYaht: function() {
		yahtEffect.start(-140, 0).chain(function() {Site.loadHomeMiddlePhoto()});
		$('home_middle_photo').setStyle('background-image', 'url(/lib/images/Photos_small_580x220_horizont.jpg)');
	},
	blurAllLinks: function() {
		$$('a').each(function(aLink) {
			aLink.addEvent('focus', function(){ aLink.blur(); });
		});
	},
	clearActiveFont: function() {
		small_a.removeClass('active_font_size');
		medium_a.removeClass('active_font_size');
	},
	slideSubNav: function() {
		subnavArray.each(function(subnav) {

		 if ( $(subnav+'_sub_nav') ) {
			slides[subnav] = new Fx.Slide(subnav+'_sub_nav', {duration : slideSpeed, wait: false});
			slides[subnav].hide();
			$(subnav+'_sub_nav').setStyle('display', 'block');
			$(subnav+'_main_nav').addEvent('mouseenter', function(){
				Site.hideAllSubNavs();
				slides[subnav].slideIn();
				navState[subnav] = true;
			});
			$(subnav+'_main_nav').addEvent('mouseleave', function(){
				//slide.slideOut();
				navState[subnav] = false;
				var forceSlide = setInterval(function() { if(!navState[subnav]) {navState[subnav]=false; slides[subnav].slideOut(); clearInterval(forceSlide);}}, closeDelay);
			});
		 }
		});
	},
	hideAllSubNavs: function() {
		subnavArray.each(function(subnav) {
			slides[subnav].slideOut();
		});
	},
	setFontSize: function() {
		var FontSize 	= Cookie.get("font_size_adjust");
		var ActiveFont 	= Cookie.get("active_font_size");
		//
		small_a		= $('small_a');
		medium_a	= $('medium_a');
		font_tags	= $$('.font_size_adjust');
		//
		if (FontSize && font_tags && $(ActiveFont)) {
			font_tags.setStyle('font-size', FontSize);
			Site.clearActiveFont();
			$(ActiveFont).addClass('active_font_size');
			//
			if ( $('hidden_risk_iceburg_col_2') && $('hidden_risk_iceburg_col_2') && $('hidden_risk_iceburg_col_3') ) {
				if ( FontSize == '9pt' ) {
					$('hidden_risk_iceburg_col_2').setStyle('padding-top', '0px');
					$('hidden_risk_iceburg_col_3').setStyle('margin-top', '125px');
				} else if ( FontSize == '12pt' ) {
					$('hidden_risk_iceburg_col_2').setStyle('padding-top', '60px');
					$('hidden_risk_iceburg_col_3').setStyle('margin-top', '180px');
				}
			}
		}
		small_a.addEvent('click', function(){
			font_tags.setStyle('font-size', '9pt');
			//
			Cookie.set('font_size_adjust', '9pt', {duration: 365});
			Cookie.set('active_font_size', 'small_a', {duration: 365});
			//
			Site.clearActiveFont();
			small_a.addClass('active_font_size');
			//
			if ( $('hidden_risk_iceburg_col_2') && $('hidden_risk_iceburg_col_2') && $('hidden_risk_iceburg_col_3') ) {
				$('hidden_risk_iceburg_col_1').setStyle('width', '140px');
				$('hidden_risk_iceburg_col_1').setStyle('margin-top', '16px');
				$('hidden_risk_iceburg_col_2').setStyle('padding-top', '0px');
				$('hidden_risk_iceburg_col_3').setStyle('margin-top', '125px');
			}
		});
		medium_a.addEvent('click', function(){
			font_tags.setStyle('font-size', '12pt');
			//
			Cookie.set('font_size_adjust', '12pt', {duration: 365});
			Cookie.set('active_font_size', 'medium_a', {duration: 365});
			//
			Site.clearActiveFont();
			medium_a.addClass('active_font_size');
			//
			if ( $('hidden_risk_iceburg_col_2') && $('hidden_risk_iceburg_col_2') && $('hidden_risk_iceburg_col_3') ) {
				$('hidden_risk_iceburg_col_1').setStyle('width', '140px');
				$('hidden_risk_iceburg_col_1').setStyle('margin-top', '16px');
				$('hidden_risk_iceburg_col_2').setStyle('padding-top', '60px');
				$('hidden_risk_iceburg_col_3').setStyle('margin-top', '180px');
			}
		});
		
	},
	toggleAllQA: function() {
		var qaDisplay = $('all_qa_box').getStyle('visibility');
		var fxAllQA = $('all_qa_box').effects({duration:700, transition: Fx.Transitions.Quart.easeOut, wait: false});
		if ( qaDisplay == 'hidden' ) {
			fxAllQA.set({'opacity': 0});
			$('all_qa_box').setStyle('display', 'block');
			fxAllQA.start({'opacity': 1});
		} else {
			fxAllQA.start({'opacity': 0});
		}
	},
	setupQuestion: function() {
		questionBox = $('question_box');
		answerBox = $('answer_box');
		
		if ( questionBox ) {
			/**** rand_no will be an even number >= 0 && <= question_arr.length ***/
			var rand_no = (Math.floor((question_arr.length/2)*Math.random()) * 2);
			current_question = rand_no;
			//current_question = 7;
			questionBox.innerHTML = question_arr[current_question];
			answerBox.innerHTML = question_arr[current_question+1];
			
			fxQ = questionBox.effects({duration:700, transition: Fx.Transitions.Quart.easeOut, wait: false});
			fxA = answerBox.effects({duration:700, transition: Fx.Transitions.Quart.easeOut, wait: false});
			/*
			$('previous_qa_lnk').addEvent('click', function(e) {
				clearInterval(changeQint);
				current_question--;
				if (current_question < 0) current_question = question_arr.length-1;
				Site.qaStep1();
			});
			
			$('next_qa_lnk').addEvent('click', function(e) {
				clearInterval(changeQint);
				current_question++;
				if (current_question >= question_arr.length) current_question = 0;
				Site.qaStep1();
			});
			*/

			changeQint = setInterval( Site.nextQuestion, 3000 );
		}
	},
	nextQuestion: function() {
		clearInterval(changeQint);
		current_question += 2;
		if (current_question >= question_arr.length) current_question = 0;
		
		changeQint = setInterval( Site.qaStep1, 300 );
	},
	prevQuestion: function() {
		clearInterval(changeQint);
		current_question -= 2;
		if (current_question < 0) current_question = question_arr.length-1;
		changeQint = setInterval( Site.qaStep1, 300 );
	},
	qaStep1: function() {
		clearInterval(changeQint);
		fxQ.start({'opacity': 0});
		fxA.start({'opacity': 0});
		changeQint = setInterval( Site.qaStep2, 1000 );
	},
	qaStep2: function() {
		clearInterval(changeQint);
		questionBox.innerHTML = question_arr[current_question];
		answerBox.innerHTML = question_arr[current_question+1];
		fxQ.start({'opacity': 1});
		changeQint = setInterval( Site.qaStep3, 1000 );
	},
	qaStep3: function() {
		clearInterval(changeQint);
		fxA.start({'opacity': 1});
		changeQint = setInterval( Site.nextQuestion, 5000 );
	},
	scrollsTo: function( pageAnchor ) {
		anchorScroll.toElement($(pageAnchor));
		 return false;
	},
	setupHomepageSound: function() {
		
	},
	setPageMiddleImg: function(imgsrc) {
		if ( $('middle_photo') ) {
			$('middle_photo').setStyle('background-image', 'url(' + imgsrc + ')');
		}
	},
	setupAjaxNews: function() {
		if ( $('news_article_wrapper') ) {
			var url = "/res/actions/get_rss_news.php";
			new Ajax(url, {
				method: 'get',
				update: $('news_article_wrapper'),
				onComplete: function() { setTimeout (Site.setupNewsArticlesScroll, 10000); }
			}).request();
		}
	},
	setupNewsArticlesScroll: function() {
		right_sidebar_media_events = $('right_sidebar_media_events');
		if (right_sidebar_media_events) {
			fxArticles = right_sidebar_media_events.effects({duration:1000, transition: Fx.Transitions.Quart.easeOut, wait: false});
			articleScrollInt = setInterval( Site.scrollNewsArticles, 6000 );
			$('news_article_wrapper').addEvent('mouseenter', function(){
				clearInterval(articleScrollInt);
			});
			$('news_article_wrapper').addEvent('mouseleave', function(){
				articleScrollInt = setInterval( Site.scrollNewsArticles, 6000 );
			});
		}
	},
	scrollNewsArticles: function() {
		//clearInterval(articleScrollInt);
		currentArticle++;
		//var coords_obj = $('news_article_wrapper').getCoordinates();
		
		if ( currentArticle > totArticles ) {
			currentArticle = 0;
			articleTop = 0;
			fxArticles.set({'margin-top': articleTop});
		}
		var nextA = $('article_li_'+currentArticle);
		if (!nextA) {
			currentArticle = 0;
			articleTop = 0;
			nextA = $('article_li_'+currentArticle);
		}
		if (nextA) {
			var coords = nextA.getCoordinates();
			//alert(coords.height);
			articleTop = articleTop - (coords.height + 20);
			fxArticles.start({'margin-top': articleTop});
			//alert(articleTop);
		}
	}
}
window.addEvent('domready', Site.pageDomReady);
window.addEvent('load', Site.pageLoaded);


function sendEvent(swf,typ,prm) { 
  thisMovie(swf).sendEvent(typ,prm); 
};
function getUpdate(typ,pr1,pr2,swf) {};
function thisMovie(swf) {
  if(navigator.appName.indexOf("Microsoft") != -1) {
    return window[swf];
  } else {
    return document[swf];
  }
};

var right_sidebar_media_events;
var fxArticles;
var currentArticle = 0;
var articleScrollInt;
var articleTop = 0;
var totArticles = 15;

var current_question;
var question_arr = Array();
var answer_arr = Array();

	question_arr[0] = 'My business pays over $1 million in insurance premiums annually, with few claims';
	question_arr[1] = 'Pay insurance premiums to your captive, retain the underwriting profit and investment income';
	
	question_arr[2] = 'My business group or association pays over $2 million in insurance premiums annually, but claims are far below that amount';
	question_arr[3] = 'Form a group captive, and all participants can benefit from insurance savings and investment income';
	
	question_arr[4] = 'My business has consistent taxable income of over $750,000';
	question_arr[5] = 'A captive, properly  structured and operated, can reduce your business taxable income and increase investment income';
	
	question_arr[6] = 'My business can\'t get the right insurance coverage for a particular risk, or the insurance is too expensive';
	question_arr[7] = 'With a captive or alternative risk structure, you may be able to obtain reasonably priced insurance with the coverage you need';
	
	question_arr[8] = 'My business has letters of credit on the books to cover a high insurance deductible program';
	question_arr[9] = 'With an alternative risk structure, those letters of credit can be turned into tax deductible premiums';
	
	question_arr[10] = 'I need an estate planning vehicle';
	question_arr[11] = 'A captive can be owned by your children or trust, effectively moving assets out of your estate, with no gift or estate tax';
	
	question_arr[12] = 'I need to protect my business and personal assets';
	question_arr[13] = 'A properly-formed captive has many asset protection benefits';
	
	question_arr[14] = 'My business provides warranty coverage to customers';
	question_arr[15] = 'Insurance premiums can be paid from your business to the captive for additional tax deductions; a captive can also write insurance to other businesses for a profit';
	
	question_arr[16] = 'I would like to provide insurance to my customer base, for risks that I understand';
	question_arr[17] = 'An association or group captive can allow you to do this, and retain the underwriting profit and investment income';
	
