/********************************************************************************
CREDITS...
*** BROWSER VERSION *** detection scripts - Source unknown
*** PAGE CODE *** by LIONHEART GROUP - sales@lionheart.info | Updated September 2005
********************************************************************************/

    var agt=navigator.userAgent.toLowerCase();
	var bVer = parseInt(navigator.appVersion); 

    // *** BROWSER VERSION *** 
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5. 
    var is_major = parseInt(navigator.appVersion); 
    var is_minor = parseFloat(navigator.appVersion); 

    // Note: Opera and WebTV spoof Navigator.  We do strict client detection. 
    // If you want to allow spoofing, take out the tests for opera and webtv. 
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
                && (agt.indexOf('webtv')==-1)); 
    var is_nav2 = (is_nav && (is_major == 2)); 
    var is_nav3 = (is_nav && (is_major == 3)); 
    var is_nav4 = (is_nav && (is_major == 4)); 
    var is_nav4up = (is_nav && (is_major >= 4)); 
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) || 
                          (agt.indexOf("; nav") != -1)) ); 
    var is_nav5 = (is_nav && (is_major == 5)); 
    var is_nav5up = (is_nav && (is_major >= 5)); 

    var is_ie   = (agt.indexOf("msie") != -1); 
    var is_ie3  = (is_ie && (is_major < 4)); 
    var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) ); 
    var is_ie4up  = (is_ie  && (is_major >= 4)); 
    var is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); 
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4); 

    var is_aol   = (agt.indexOf("aol") != -1); 
    var is_aol3  = (is_aol && is_ie3); 
    var is_aol4  = (is_aol && is_ie4); 

    var is_opera = (agt.indexOf("opera") != -1); 
    var is_webtv = (agt.indexOf("webtv") != -1);
	
/********************************************************************************
*** VARS & ARRAYS ***
*********************************************************************************/

var sitePath = 'http://www.yacht-insurance.ca/'

monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
weekDay = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");

/********************************************************************************
*** PAGE CODE ***
*********************************************************************************/

// V.4 DREAMWEAVER ROLLOVER CODE

function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_displayStatusMsg(msgStr) { //v1.0
    status=msgStr;
    document.MM_returnValue = true;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_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];}}
}

function MM_findObj(n, d) { //v4.0
    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i>d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
	
function preLoadSomething() {
	MM_preloadImages('Objects Here');
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function loadDoc(selObj,restore){ //v3.0
  docPath = sitePath + selObj.options[selObj.selectedIndex].value;
  window.open(docPath);
  //document.write(thisDoc);
  if (restore) selObj.selectedIndex=0;
}

/*--------------------------------------------------------------*/
// PARENT TRAP

function checkFrame() {
	if (top.location != self.location) top.location = self.location ;
	} 
    
/*--------------------------------------------------------------*/
// POP-UP WINDOWS

function loadVideo(thisPage) {
	myPath = sitePath + 'video/index_' + thisPage + '.html' ;
	switch (thisPage) {
        case 'wmp':  // Windows Media Player
            W = 320 ;
			H = 284 ;
            break;
		case 'qt':  // QuickTime
            W = 320 ;
			H = 241 ;
            break;
    	}
	if (bVer >= 4) {
		L = screen.width / 2 - W / 2 ;
		T = screen.height / 2 - H / 2 ;
	}
	else {
		L = 20 ;
		T = 20 ;
	}
		    
    videoWin = window.open(myPath,'myWin','menubar="no",width='+W+',height='+H+',left='+L+',top='+T+',screenX='+L+',screenY='+T+',status="no",scrollbars="no",resize="no",alwaysRaised="yes"');
	videoWin.focus();
	if (videoWin.opener == null) videoWin.opener = window;
}
	
/*--------------------------------------------------------------*/
    

// Date and Time

var now = new Date();

	if (now.getHours() > 12) {
		nHour = now.getHours() - 12;
	}
	else {
		nHour = now.getHours();
	}

	if (now.getHours() >= 12) {
		nAMPM = "PM";
	}
	else {
		nAMPM = "AM";
	}

	if (now.getMinutes() > 10) {
		nMinute = now.getMinutes();
	}
	else {
		nMinute = '0' + now.getMinutes();
	}

var nSecond = now.getSeconds();
var nDay = weekDay[now.getDay()];
var nMonth = monthNames[now.getMonth()];
var nDate = now.getDate();
var nYear = now.getFullYear();
var nTime = nHour + ':' + nMinute + nAMPM + ' ' + nDay  + ', '  + nMonth + ' ' + nDate + ', ' + nYear;
var shortDate = nMonth + ' ' + nDate + ', ' + nYear;

function getDate() {
	return (shortDate);
	}


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




            