


function switchMenu(obj) {



// Window dimensions:
var theWidth;
if (window.innerWidth)
theWidth=window.innerWidth;
else if (document.documentElement && document.documentElement.clientWidth)
theWidth=document.documentElement.clientWidth;
else if (document.body)
theWidth=document.body.clientWidth;


//var wdt = document.documentElement.clientWidth;
var lwdt = (theWidth/2);



var el = document.getElementById(obj);
if ( el.style.display != 'none' ) {
el.style.display = 'none';
}
else {
el.style.display = '';


var T=document.getElementById(obj);

lwdt = lwdt-(T.offsetWidth/2);

el.style.left = lwdt+ 'px';



}
}

function switchMenu2(obj) {

var el = document.getElementById(obj);
if ( el.style.display != 'none' ) {
el.style.display = 'none';
} else {
el.style.display = '';
}
}

$(document).ready(function(){
	    $(".scroll").click(function(event){
	        //prevent the default action for the click event
	        event.preventDefault();
	 
	        //get the full url - like mysitecom/index.htm#home
	        var full_url = this.href;
	 
	        //split the url by # and get the anchor target name - home in mysitecom/index.htm#home
	        var parts = full_url.split("#");
	        var trgt = parts[1];
	 
	        //get the top offset of the target anchor
	        var target_offset = $("#"+trgt).offset();
	        var target_top = target_offset.top;
	 
	        //goto that anchor by setting the body scroll top to anchor top
	        $('html, body').animate({scrollTop:target_top}, 500);
	    });
 /*
        $(".submit_btn").click(function() {  
            var semail = $("input#subscribe_txt").val();  
            if (semail != "") {
                var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
                if( !emailReg.test( semail ) ) {
                    alert(semail + ' is not a valid email address');
                }else {
                    $.ajax({  
                      type: 'GET',  
                      url: 'process.php',  
                      data: {email:semail}, 
                      success: function() {
                        $('#subscription_bar').html("")
                        .hide();
                        $('#subscription_bar').css("background-image", "url(images/subscribe_bg2.png)")
                        .fadeIn(1500);  
                      }  
                    });
                }
                
                
                return false;  
            } else {
                return false;
            }
        });  
*/





});

function inputBack() {
    var formId = document.getElementById('subscribe_txt');   
    if (formId.value == '') {
        formId.value = 'Email Address';
    }
}

function inputGo() {
    var formId = document.getElementById('subscribe_txt');   
    if (formId.value == 'Email Address') {
        formId.value = '';
    }
}


