var NS4 = (navigator.appName.indexOf("Netscape")>=0 && parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) < 5)? true : false;
var IE4 = (document.all)? true : false;
var NS6plus = (parseFloat(navigator.appVersion) >= 5 && navigator.appName.indexOf("Netscape")>=0 )? true: false;
var isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
var IEmac = ((document.all) && (isMac)) ? true : false;
var IE4plus = (document.all) ? true : false;
var IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
var IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;
var Opera7plus = ((document.all)&&(navigator.userAgent.indexOf("Opera 7")!=-1)) ? true : false;
var FF1 = (navigator.userAgent.indexOf("Firefox\/1")!=-1) ? true : false;
var Opera = (navigator.userAgent.indexOf("Opera")!=-1) ? true : false;
var Mozilla = (NS6plus && (navigator.userAgent.indexOf("Netscape") < 0));
var IsLocal = (location.href.indexOf("file://")>-1)? true : false;
var initPlayer = 0; 
var idI;

var oPres = 
{'SLIDES':[
{'SlideSeq': '1', 'Title': 'Mutuals post the crisis-rising to the challenge? A rating agency perspective', 'ClipFile': '1.wmv', 'SlideFile': 'slide_1_22.png', 'TimePoint': 0},
{'SlideSeq': '2', 'Title': 'Today’s presentation', 'ClipFile': '1.wmv', 'SlideFile': 'slide_2_23.png', 'TimePoint': 21733},
{'SlideSeq': '3', 'Title': '‘Who are these guys……?’', 'ClipFile': '1.wmv', 'SlideFile': 'slide_3_24.png', 'TimePoint': 98000},
{'SlideSeq': '4', 'Title': 'A.M. Best overview', 'ClipFile': '1.wmv', 'SlideFile': 'slide_4_25.png', 'TimePoint': 191200},
{'SlideSeq': '5', 'Title': 'Impact of the financial crisis on ratings', 'ClipFile': '1.wmv', 'SlideFile': 'slide_5_26.png', 'TimePoint': 280000},
{'SlideSeq': '6', 'Title': 'Background to mutual sector report', 'ClipFile': '1.wmv', 'SlideFile': 'slide_6_27.png', 'TimePoint': 402933},
{'SlideSeq': '7', 'Title': '‘Mutuals under the microscope’', 'ClipFile': '1.wmv', 'SlideFile': 'slide_7_28.png', 'TimePoint': 485933},
{'SlideSeq': '8', 'Title': 'What you told us', 'ClipFile': '1.wmv', 'SlideFile': 'slide_8_29.png', 'TimePoint': 600266},
{'SlideSeq': '9', 'Title': 'What we discuss', 'ClipFile': '1.wmv', 'SlideFile': 'slide_9_30.png', 'TimePoint': 663133},
{'SlideSeq': '10', 'Title': 'Mutual market share in the top 10', 'ClipFile': '1.wmv', 'SlideFile': 'slide_10_31.png', 'TimePoint': 753200},
{'SlideSeq': '11', 'Title': 'Impairments by type of ownershipfor US property/casualty insurers (1969-2008)', 'ClipFile': '1.wmv', 'SlideFile': 'slide_11_32.png', 'TimePoint': 810533},
{'SlideSeq': '12', 'Title': 'Impairments vs. combined ratios of US stock & mutual P/C insurers (1969-2008)', 'ClipFile': '1.wmv', 'SlideFile': 'slide_12_33.png', 'TimePoint': 915066},
{'SlideSeq': '13', 'Title': 'Interactive questions', 'ClipFile': '1.wmv', 'SlideFile': 'slide_13_34.png', 'TimePoint': 1187466},
{'SlideSeq': '14', 'Title': 'What we discuss', 'ClipFile': '1.wmv', 'SlideFile': 'slide_14_35.png', 'TimePoint': 1190600},
{'SlideSeq': '15', 'Title': 'Why do insurers get rated?', 'ClipFile': '1.wmv', 'SlideFile': 'slide_15_36.png', 'TimePoint': 1215933},
{'SlideSeq': '16', 'Title': 'Users of ratings', 'ClipFile': '1.wmv', 'SlideFile': 'slide_16_37.png', 'TimePoint': 1292666},
{'SlideSeq': '17', 'Title': 'What we evaluate', 'ClipFile': '1.wmv', 'SlideFile': 'slide_17_38.png', 'TimePoint': 1303800},
{'SlideSeq': '18', 'Title': 'A.M. Best rating actions for mutuals', 'ClipFile': '1.wmv', 'SlideFile': 'slide_18_39.png', 'TimePoint': 1387466},
{'SlideSeq': '19', 'Title': 'Rating distribution for mutuals 2008', 'ClipFile': '1.wmv', 'SlideFile': 'slide_19_40.png', 'TimePoint': 1478200},
{'SlideSeq': '20', 'Title': 'What we conclude', 'ClipFile': '1.wmv', 'SlideFile': 'slide_20_41.png', 'TimePoint': 1544333},
{'SlideSeq': '21', 'Title': 'Mutuals post the crisis-rising to the challenge? A rating agency perspective', 'ClipFile': '1.wmv', 'SlideFile': 'slide_21_42.png', 'TimePoint': 1613400}
]}
var currSlideSeq=1;
var currDivId = "nt1";

function TabSelected(sel) { 
	tmpC=(parent.tabs.document.getElementById('tabNavigation').children.length -1)
	
	for (var i = 0; i < tmpC; i++) { 
		style2=parent.tabs.document.getElementById('tabNavigation').children[i]		
		if (i==sel) { 
			style2.className="selectedTab"
		} else { 
			style2.className=""	
		}
		
	} 

} 

function ChangeTab() {	
	var argv = ChangeTab.arguments;
	var argc = argv.length;
	for (var i = 0; i < argc; i++) {		
		style1=parent.tabcontent.document.getElementById(argv[i]).style
			
		if (i==0) { 
			style1.display="block"			
		} else { 
			style1.display="none"			
		} 
		if (argv[i]=='outline') { 
			parent.tabs.document.getElementById('tabNavBar').innerHTML="<div id='tabNavBar' style='background: #6D6FF9;border-top: line-height: 20px;text-align:right;padding: 0 0 0 0;color: #FFF;font-weight: bold;'>&nbsp;</div>"
		} else { 
			parent.tabs.document.getElementById('tabNavBar').innerHTML="<div id='tabNavBar' style='background: #6D6FF9;border-top: line-height: 20px;text-align:right;padding: 0 0 0 0;color: #FFF;font-weight: bold;'>Time Point</div>"
		} 
	}	
	return false; 	
}

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos) {
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=yes,toolbar=no,resizable=yes';
	win=window.open(mypage,myname,settings);
}

function SetCurrentSlide(sSeq){
	for (i=0;i<parent.oPres.SLIDES.length;i++) { 
		elem = parent.tabcontent.document.getElementById('row_' + parent.oPres.SLIDES[i].SlideSeq);
		elem1 = parent.thumbs.document.getElementById('trow_' + parent.oPres.SLIDES[i].SlideSeq);
		elem2 = parent.thumbs.document.getElementById('trow_' + parent.oPres.SLIDES[i].SlideSeq + 'a');
		elem3 = parent.thumbs.document.getElementById('trow_' + parent.oPres.SLIDES[i].SlideSeq + 'b');
		if (sSeq == parent.oPres.SLIDES[i].SlideSeq) { 			
			elem.className = 'current';
			elem1.className = 'current';
			elem2.className = 'current';
			elem3.className = 'current';			
			currSlideSeq=sSeq; 			
		}  else { 
			elem.className = '';
			elem1.className = '';
			elem2.className = '';
			elem3.className = '';
		} 

	} 
	parent.togDiv('nt' + currSlideSeq);
	
}
function togDiv(id) {
	if(currDivId) setDisplay(currDivId, "none");
	if(id) setDisplay(id, "block");
	currDivId = id;
}

function setDisplay(id,value) {
	var el = parent.tabcontent.document.getElementById(id);
	el.style.display = value;
}
function GetSlideIdxByTimepoint(tMS) { 
	for (j=0; j<oPres.SLIDES.length; j++) { 		
		if (tMS==oPres.SLIDES[j].TimePoint || (tMS+1000) ==oPres.SLIDES[j].TimePoint) { 				
			return j;
		} 
	}
} 
