


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);
	    });

});




