<!--
//======================================
// Author Ray Pooley 2009 : http://SMEGateway.co.uk 
//======================================
        var ns = 0;
        var ie = 0;
        var ch = 0;
        var sa = 0;
        var op = 0;
        var appVer;    
        var maxChars = 1000;
        var charsLeft = 0; 
        var appName 	= navigator.appName;
        var appVersion	= navigator.appVersion;
        var maxMapH = 2000;
        var maxMapW = 1000;
        var minMapH = 500;
        var SMOptionCount = 13;
        
        var nowDate = new Date(); 
        var targetDate = new Date();
        targetDate.setFullYear(2010,4,6);
        
        var    clockStr = "";
             
        if (navigator.appName.indexOf("Microsoft") != -1) {
        
	        ie = 1;
	        ns = 0;
	        ch = 0;
	        sa = 0;
            op = 0;
	        tmp 	= appVersion.split(';');
	        tmp2	= tmp[1].split(' ');
	        appVer	= parseFloat(tmp2[2]);
	        
        } else {
        
              if (navigator.appVersion.toLowerCase().indexOf("chrome") != -1) {
                        sa = 0;
    	                ns = 0;
	                    ie = 0;
	                    ch = 1;
                        op = 0;

	                    tmp 	= appVersion.split(' ');
	                    appVer	= parseFloat(tmp[0]);   
	                         
                } else {
                
                        if (navigator.appVersion.toLowerCase().indexOf("applewebkit") != -1) {
                            sa = 1;
    	                    ns = 0;
	                        ie = 0;
	                        ch = 0;  
                            op = 0;
              
                        } else {
                        
                            if (navigator.appName.toLowerCase().indexOf("opera") != -1) {
                                sa = 0;
    	                        ns = 0;
	                            ie = 0;
	                            ch = 0;
	                            op = 1;
	                            tmp 	= appVersion.split(' ');
	                            appVer	= parseFloat(tmp[0]);
	                    
	                       } else {
	                    
	                            sa = 0;
    	                        ns = 1;
	                            ie = 0;
	                            ch = 0;
	                            op = 0;

	                            tmp 	= appVersion.split(' ');
	                            appVer	= parseFloat(tmp[0]);
                    
	                        }
	                    
	                    }
	                    
	          }
	          
        } 
      
       function tmflipit(flipid,flipind){
            setTMButtonsOut(); 
            buttonStr = 'flipObj = document.getElementById("tm' + flipid + '")';
            eval(buttonStr);
            linkStr = 'linkObj = document.getElementById("lnk' + flipid + '")';
            eval(linkStr);
            acStr = 'acObj = document.getElementById("ac' + flipid + '")';
            eval(acStr);

            if (ie) {      
                if (flipind == 1){
                    flipObj.className = "tmclassover";
                    linkObj.className = "menuTextOver";
                    acObj.className = "menuTextOver";                    
                } else {
                    flipObj.className = "tmclassout";
                    linkObj.className = "menuTextOut";
                    acObj.className = "menuTextOut";                
                }
            } else {
                if (flipind == 1){
                    flipObj.className = "tmclassover";
                    linkObj.className = "menuTextOver";
                    acObj.className = "menuTextOver";                    
                } else {
                    flipObj.className = "tmclassout";
                    linkObj.className = "menuTextOut";
                    acObj.className = "menuTextOut";                
                 }
             } 
           
                         
        }
     
      function smflipit(flipid,flipind){
             setSMButtonsOut(); 
            
            buttonStr = 'flipObj = document.getElementById("tm' + flipid + '")';
            eval(buttonStr);
            linkStr = 'linkObj = document.getElementById("lnk' + flipid + '")';
            eval(linkStr);
            acStr = 'acObj = document.getElementById("ac' + flipid + '")';
            eval(acStr); 

            if (ie) {      
                if (flipind == 1){
                    flipObj.className = "smclassover";
                    linkObj.className = "menuTextOver";
                    acObj.className = "menuTextOver";                
                } else {
                    flipObj.className = "smclassout";
                    linkObj.className = "menuTextOut";
                    acObj.className = "menuTextOut";                
                }   
            } else {
                if (flipind == 1){
                    flipObj.className = "smclassover";
                    linkObj.className = "menuTextOver";
                    acObj.className = "menuTextOver";                
                } else {
                    flipObj.className = "smclassout";
                    linkObj.className = "menuTextOut";
                    acObj.className = "menuTextOut";                
                }            
            }
            
   }
       
   function countChars(){
        charsLeft = maxChars-parseFloat(document.getElementById("enquiry").value.length);
        spanObj =  document.getElementById("RemChars");
        spanObj.innerText=charsLeft;
   }
   
   function changeMapArea(ind){
        topObj = document.getElementById("topDiv");
        mapObj = document.getElementById("map");
        if (ind == 1){
            if (ie){
               mapObj.style.pixelHeight= 2000;
            } else {
                mapObj.style.height = "2000px";
                loadGoogleMaps(); 
            }
           
        } else {
            if (ie){
                mapObj.style.pixelHeight = 500;
            }  else {
                mapObj.style.height = "500px";
                loadGoogleMaps(); 
            }      
       } 
   }
   function setTMButtonOver(buttonid){
            buttonStr = 'flipObj = document.getElementById("tm' + buttonid + '")';
            eval(buttonStr);
            linkStr = 'linkObj = document.getElementById("lnk' + buttonid + '")';
            eval(linkStr);
            acStr = 'acObj = document.getElementById("ac' + buttonid + '")';
            eval(acStr);
            flipObj.className = "tmclassover";
            linkObj.className = "menuTextOver";
            acObj.className = "menuTextOver";

   }
   
   function setTMButtonsOut(){
        for (i=1;i<8;i++){
            buttonStr = 'flipObj = document.getElementById("tm' + i + '")';
            eval(buttonStr);
            linkStr = 'linkObj = document.getElementById("lnk' + i + '")';
            eval(linkStr);
            acStr = 'acObj = document.getElementById("ac' + i + '")';
            eval(acStr);
            flipObj.className = "tmclassout";
            linkObj.className = "menuTextOut";
            acObj.className = "menuTextOut";

        }
   }
   
   function setSMButtonOver(buttonid){
 
            buttonStr = 'flipObj = document.getElementById("tm' + buttonid + '")';
            eval(buttonStr);
            linkStr = 'linkObj = document.getElementById("lnk' + buttonid + '")';
            eval(linkStr);
            acStr = 'acObj = document.getElementById("ac' + buttonid + '")';
            eval(acStr);
            flipObj.className = "smclassover";
            linkObj.className = "menuTextOver";
            acObj.className = "menuTextOver";

   }
   
   function setSMButtonsOut(){
        for (i=8;i<=SMOptionCount;i++){
           
            buttonStr = 'flipObj = document.getElementById("tm' + i + '")';
            eval(buttonStr);
            linkStr = 'linkObj = document.getElementById("lnk' + i + '")';
            eval(linkStr);
            acStr = 'acObj = document.getElementById("ac' + i + '")';
            eval(acStr);
            flipObj.className = "smclassout";
            linkObj.className = "menuTextOut";
            acObj.className = "menuTextOut";

        }
   }
      
// opens a page in a popup
function openWindow(pageName){
	nowdate = new Date();
	winW = "800px";
	winH = "560px";
	windecs="top=0px, left=0px, width="+winW+", height="+winH+", scrollbars=no, resizable=no";
	newwin = window.open(pageName, 'newwin', windecs);
	newwin.moveTo(0,0);
	newwin.focus();
}
   function countDown(){
           nowDate = new Date(); 
           secondsRemaining =  Math.floor((targetDate.getTime() - nowDate.getTime())/1000);
           dd = Math.floor(secondsRemaining/(24*3600));
           hh = Math.floor((secondsRemaining - (dd*24*3600))/3600);
           mm = Math.floor((secondsRemaining - (dd*24*3600) - (hh*3600))/60);
           ss = secondsRemaining - (dd*24*3600) - (hh*3600) - (mm*60);

           clockStr = "<table cellpadding=\"0px\" cellspacing=\"0px\" style=\"border:none\"><tr>" + 
                                   "<td style=\"font-size:14pt;color:#FFFF00;font-family:arial;background-color:#000000;vertical-align:bottom\">"+dd+"</td>" + 
                                   "<td style=\"font-size:8pt;color:#FFFF00;font-family:arial;background-color:#000000;vertical-align:bottom\">&nbsp;Days&nbsp;</td>" + 
                                    "<td style=\"font-size:14pt;color:#FFFF00;font-family:arial;background-color:#000000;vertical-align:bottom\">"+hh+"</td>" + 
                                   "<td style=\"font-size:8pt;color:#FFFF00;font-family:arial;background-color:#000000;vertical-align:bottom\">&nbsp;Hours&nbsp;</td>" + 
                                   "<td style=\"font-size:14pt;color:#FFFF00;font-family:arial;background-color:#000000;vertical-align:bottom\">"+mm+"</td>" + 
                                   "<td style=\"font-size:8pt;color:#FFFF00;font-family:arial;background-color:#000000;vertical-align:bottom\">&nbsp;Mins&nbsp;</td>" + 
                                    "<td style=\"font-size:14pt;color:#FFFF00;font-family:arial;background-color:#000000;vertical-align:bottom\">"+ss+"</td>" + 
                                   "<td style=\"font-size:8pt;color:#FFFF00;font-family:arial;background-color:#000000;vertical-align:bottom\">&nbsp;Secs</td>" + 
                                   "</tr></table>";  
           
          document.getElementById("clockTd").innerHTML = clockStr;
          
           //document.getElementById("clockTd").innerHTML = dd+" Days "+hh+" Hours "+mm+" Mins "+ss+" Secs";
           
           window.setTimeout('countDown()',1000);
   }
   //-->
