// header slide show
var mygallery=new fadeSlideShow({
	wrapperid: "banner", //ID of blank DIV on page to house Slideshow
	dimensions: [1022, 255], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		["/images/banner2.jpg"],
		["/images/banner1.jpg"],
		["/images/banner4.jpg"],
		["/images/banner3.jpg"]
	],
	displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 700, //transition duration (milliseconds)
	descreveal: "ondemand",
	togglerid: ""
})
 

// testimonial
function testimonial1() 
{
	document.getElementById('slide1').style.display = 'block';
	document.getElementById('slide2').style.display = 'none';
}

function testimonial2() 
{	document.getElementById('slide2').style.display = 'block';
	document.getElementById('slide1').style.display = 'none';
}


 // digital counter

var savingPerSecond = 30;
var incrementSpeedInSeconds = 0.5;

var today=new Date(2010, 12-1, 16, 1, 29, 57);

var startDate=new Date(2010, 1-1, 1);
var savingsToDate = Math.ceil((today.getTime() - startDate.getTime())/1000)*savingPerSecond;
var increment = savingPerSecond * incrementSpeedInSeconds;
var pace = incrementSpeedInSeconds * 1000;
var intervalId;
var theNumber = savingsToDate;

jQuery(document).ready(function(){
    initialDigitCheck(savingsToDate);
    intervalId = setInterval(doCount, pace);
    setTimeout ( 'clearInterval(intervalId)', 15 * 60000 );
});

 


// browser framework      
 
        var Browser = {
          Version: function() {
            var version = 999; // we assume a sane browser
            if (navigator.appVersion.indexOf("MSIE") != -1)
              // bah, IE again, lets downgrade version number
              version = parseFloat(navigator.appVersion.split("MSIE")[1]);
            return version;
          }
        };
        var browserName=navigator.appName;
        if (browserName=="Microsoft Internet Explorer") {
            if (parseFloat(Browser.Version()) <= 6 ) {
                document.write('<link id="baseframeworkie6" type="text/css" rel="stylesheet" href="/css/base-framework-ie6.css" />');
            }
            else if(parseFloat(Browser.Version()) == 7) {
                document.write('<link id="baseframeworkie7" type="text/css" rel="stylesheet" href="/css/base-framework-ie7.css" />');
            }
            else {
                document.write('<link id="baseframeworkie" type="text/css" rel="stylesheet" href="/css/base-framework.css" />');
            }
        }
        else {
            document.write('<link id="baseframework" type="text/css" rel="stylesheet" href="/css/base-framework.css" />');
        } 
        

// feedback pop

function feedback_debt()  /*----------pop up menu------------*/
  {
	  var str = "";
	str +="<div class='FAQshead_div11' align='center'><a href='javascript:void(0);' title='Have You Found Our Site Helpful' onclick=\"popup('wp-content/themes/Selene/feedback.html');\"><img src='/images/feedback.jpg' alt='Have You Found Our Site Helpful'  /></a></div>";
	
document.write(str);	
	
  }
 
 function feedback_here()  /*----------pop up menu------------*/
  {
	  var str = "";
	str +="<div class='FAQshead_div11' align='center'><a href='javascript:void(0);' title='Have You Found Our Site Helpful' onclick=\"popup('wp-content/themes/Selene/feedback.html');\"><img src='/images/feedback_here.gif' alt='Have You Found Our Site Helpful'  /></a></div>";
	
document.write(str);	
	
  }

  
  
 /*------------------function for Popup----------------------------*/

function popup(url)
{
	/*alert('dsfdsf');*/
	var width = 520;
	var height = 412;
	var left = (screen.width - width)/2;
	var top = (screen.height - height)/2;
	
	window.open(url,'_blank','toolbar=no,scrollbars=yes,width='+width+',height='+height+',top='+top+',left='+left+',resizable=no');
}





   		
