function getFlashVersion(){ 
  // ie 
  try { 
    try { 
      // avoid fp6 minor version lookup issues 
      // see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/ 
      var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6'); 
      try { axo.AllowScriptAccess = 'always'; } 
      catch(e) { return '6,0,0'; } 
    } catch(e) {} 
    return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]; 
  // other browsers 
  } catch(e) { 
    try { 
      if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){ 
        return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]; 
      } 
    } catch(e) {} 
  } 
  return '0,0,0'; 
} 
 
var version = getFlashVersion().split(',').shift(); 
if(version < 10){ 
 window.location=("FlashVersion.html")
}else{ 
 // alert("10 or higher"); 
}

if(navigator.userAgent.indexOf("Firefox") != -1)
{
 //  window.location = "http://www.i-code.co.uk";
 	Newwindow=window.open("","Newwindow","width=300,height=250");
	Newwindow.document.write('<body bgcolor="white">')
	setTimeout("Newwindow.close()",20000);
	Newwindow.document.write('<center><h1> Firefox Browser Detected !!! </h1></center>');
	Newwindow.document.write('<b>St James Website is design to work under Internet Explorer 7.      \r\r       For optimal viewing please use Internet Explorer 7.   \r\r     <b/>');
	Newwindow.document.write('This page will close automatically in 20 seconds');
	Newwindow.document.close();
}
//else
//{
//   window.location = "index.html"; break;/
//}

//THE FOLLOWING IS THE DETECTION OF THE RESOLUTION
switch(screen.width) {
 	case 640: goToPage('640x480.htm'); break;
 	case 720: goToPage('720x480.htm'); break;
 	case 800: goToPage('800x600.htm'); break;
 	case 848: goToPage('848x480.htm'); break;
 	case 1024: ('index.html'); break;
 	case 1152: ('index.html'); break; //goToPage('1152x864.htm'); break;
 	case 1280: ('index.html'); break; //goToPage('1280x1024.htm'); break;
 	case 1600: ('index.html'); break;//goToPage('1600x1200.htm'); break;
 	//default : goToPage('');// break;
}

function goToPage(url) {
	// window.open('FirefoxResolution.html');
	Newwindow=window.open("","Newwindow","width=300,height=250");
	Newwindow.document.write('<body bgcolor="white">')
	setTimeout("Newwindow.close()",20000);
	Newwindow.document.write('<center><h1> Resolution Problem Detected !!! </h1></center>');
	Newwindow.document.write('<b>St James Website is design for an optimal resolution of 1024 x 768.      \r\r       Please change your resolution to match 1024 x 768 or zoom out/in your browser.    \r\r     <b/>');
	Newwindow.document.write('This page will close automatically in 20 seconds');
	Newwindow.document.close();
}

