// JavaScript Document

// all the individual browser functions should be declared here in the correct function call
// if you need to seperate the necessary browser in specific versions please use a switch statment inside the relevant function call
// if we need to know the version as well then we can also add  :: BrowserDetect.version  :: to find the version

// addd     onload="setupMYscreen()"   to the body tag of the web page you wish to use this in (also the script src ...... !!)

// specify each set per style sheet  -- main.css for home page and so on

// ===================================  main.css  ==========================================================

function Hadjust4_MSIE(){
// if MSIE then do this......

// NOTE :: generally beause IE has so many bugs, we use the IF IE commands to add in the additional required css sheet
	
}//end function

function Hadjust4_Firefox(){
// if FIREFOX then do this......


}//end function

function Hadjust4_Opera(){
// if OPERA then do this......

//if you are having problems then please un comment this alert box to test that the code is correctly identifying your browser
	//alert('found opera');
	
	//change  class name TO FIX title font size issue
	//document.getElementById('recpTitle').className = 'mid_leisureContentTitleSAFARI';
	
	
	//add 10px height    container : 1571px 
	// css sheet title -->> main.css
	document.getElementById('container').style.height = '1571px';

	// no clock working so take away the clock face
	//document.getElementById('clockWrapper').style.backgroundImage = 'url(../assets/images/sm_purp.jpg)';
}//end function

function Hadjust4_Safari(){
// if SAFARI then do this......

// IF SAFRAI...

	//add 10px height    container : 1571px 
	// css sheet title -->> main.css
	document.getElementById('container').style.height = '1571px';

	//change  class name TO FIX title font size issue
	//document.getElementById('recpTitle').className = 'mid_leisureContentTitleSAFARI';

	// no clock working so take away the clock face
	//document.getElementById('clockWrapper').style.backgroundImage = 'url(../assets/images/sm_purp.jpg)';
}//end function

function Hadjust4_Chrome(){
// if GOOGLE CHROME then do this......

}//end function

//================================   pages css sheet ===========================================

function adjust4_MSIE(){
// if MSIE then do this......

// NOTE :: generally beause IE has so many bugs, we use the IF IE commands to add in the additional required css sheet
	
}//end function

function adjust4_Firefox(){
// if FIREFOX then do this......


}//end function

function adjust4_Opera(){
// if OPERA then do this......

//if you are having problems then please un comment this alert box to test that the code is correctly identifying your browser
	//alert('found opera');
	

	//add 10px height    container : 1341px 
	// css sheet title -->> main.css
	document.getElementById('container').style.height = '1351px';

	// no clock working so take away the clock face
	//document.getElementById('clockWrapper').style.backgroundImage = 'url(../assets/images/sm_purp.jpg)';
}//end function

function adjust4_Safari(){
// if SAFARI then do this......

// IF SAFRAI...

	//add 10px height    container : 1341px 
	// css sheet title -->> main.css
	document.getElementById('container').style.height = '1351px';

	// no clock working so take away the clock face
	//document.getElementById('clockWrapper').style.backgroundImage = 'url(../assets/images/sm_purp.jpg)';
}//end function

function adjust4_Chrome(){
// if GOOGLE CHROME then do this......

}//end function


//================================   Bcat_pages css sheet ===========================================

function Badjust4_MSIE(){
// if MSIE then do this......

// NOTE :: generally beause IE has so many bugs, we use the IF IE commands to add in the additional required css sheet
	
}//end function

function Badjust4_Firefox(){
// if FIREFOX then do this......


}//end function

function Badjust4_Opera(){
// if OPERA then do this......

//if you are having problems then please un comment this alert box to test that the code is correctly identifying your browser
	//alert('found opera');
	

	//add 10px height    container : 1600px 
	// css sheet title -->> main.css
	document.getElementById('container').style.height = '1610px';

	// no clock working so take away the clock face
	//document.getElementById('clockWrapper').style.backgroundImage = 'url(../assets/images/sm_purp.jpg)';
}//end function

function Badjust4_Safari(){
// if SAFARI then do this......

// IF SAFRAI...

	//add 10px height    container : 1600px 
	// css sheet title -->> main.css
	document.getElementById('container').style.height = '1610px';

	// no clock working so take away the clock face
	//document.getElementById('clockWrapper').style.backgroundImage = 'url(../assets/images/sm_purp.jpg)';
}//end function

function Badjust4_Chrome(){
// if GOOGLE CHROME then do this......

}//end function










//============================================================================================
//  NOTHING BELOW HERE



// document.write('<p class="accent">You\'re using ' + BrowserDetect.browser + ' ' + BrowserDetect.version + ' on ' + BrowserDetect.OS + '!</p>');
//  output ::  You're using Firefox 2 on Windows!

var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{
			string: navigator.userAgent,
			subString: "Chrome",
			identity: "Chrome"
		},
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari",
			versionSearch: "Version"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			   string: navigator.userAgent,
			   subString: "iPhone",
			   identity: "iPhone/iPod"
	    },
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};

BrowserDetect.init();

function HsetupMYscreen(){
// if we need to know the version as well then we can also add  :: BrowserDetect.version  :: to find the version

// currently we can detect IE but we use IF IE as there are ussually more problems with IE !!

switch (BrowserDetect.browser){
	case 'Firefox':
		//instructions for Firefox
		Hadjust4_Firefox();
	break;
	case 'Opera':
		//instructions for Opera
		Hadjust4_Opera();
	break;
	case 'Safari':
		//instructions for Safari
		Hadjust4_Safari();
	break;
	case 'Chrome':
		//instructions for Chrome
		Hadjust4_Chrome();
	break;
	
	case 'Explorer':
		//instructions for Explorer
		Hadjust4_MSIE();
	break;
}//end switch
//   http://www.quirksmode.org/js/detect.html
}//end function



function setupMYscreen(){
// if we need to know the version as well then we can also add  :: BrowserDetect.version  :: to find the version

// currently we can detect IE but we use IF IE as there are ussually more problems with IE !!

switch (BrowserDetect.browser){
	case 'Firefox':
		//instructions for Firefox
		adjust4_Firefox();
	break;
	case 'Opera':
		//instructions for Opera
		adjust4_Opera();
	break;
	case 'Safari':
		//instructions for Safari
		adjust4_Safari();
	break;
	case 'Chrome':
		//instructions for Chrome
		adjust4_Chrome();
	break;
	
	case 'Explorer':
		//instructions for Explorer
		adjust4_MSIE();
	break;
}//end switch
//   http://www.quirksmode.org/js/detect.html
}//end function


function BsetupMYscreen(){
// if we need to know the version as well then we can also add  :: BrowserDetect.version  :: to find the version

// currently we can detect IE but we use IF IE as there are ussually more problems with IE !!

switch (BrowserDetect.browser){
	case 'Firefox':
		//instructions for Firefox
		Badjust4_Firefox();
	break;
	case 'Opera':
		//instructions for Opera
		Badjust4_Opera();
	break;
	case 'Safari':
		//instructions for Safari
		Badjust4_Safari();
	break;
	case 'Chrome':
		//instructions for Chrome
		Badjust4_Chrome();
	break;
	
	case 'Explorer':
		//instructions for Explorer
		Badjust4_MSIE();
	break;
}//end switch
//   http://www.quirksmode.org/js/detect.html
}//end function