﻿function notEmpty(elem, helperMsg) {    if (elem.value.length == 0) {        alert(helperMsg);        elem.focus(); // set the focus to this input        return false;    }    return true;}function isNumeric(elem, helperMsg) {    var numericExpression = /^[0-9]+$/;    if (elem.value.match(numericExpression)) {        return true;    } else {        alert(helperMsg);        elem.focus();        return false;    }}function emailValidator(elem, helperMsg) {    var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;    if (elem.value.match(emailExp)) {        return true;    } else {        alert(helperMsg);        elem.focus();        return false;    }}function isAlphabet(elem, helperMsg) {    var alphaExp = /^[a-zA-Z']+$/;    if (elem.value.match(alphaExp)) {        return true;    } else {        alert(helperMsg);        elem.focus();        return false;    }}function MM_swapImage() { //v3.0    var i, j = 0, x, a = MM_swapImage.arguments; document.MM_sr = new Array; for (i = 0; i < (a.length - 2); i += 3) {        if ((x = MM_findObj(a[i])) != null) { document.MM_sr[j++] = x; if (!x.oSrc) x.oSrc = x.src; x.src = a[i + 2]; }    }}function Tabs(obj) {    var select = function (link) {        var div = $(link).attr("href");        if (div) {            $(obj).find('div.tab').hide();            $(obj).find('ul.tabnav li a').removeClass("selected");            $(link).addClass("selected");            $(div).show();        }        return false;    }    var onclick = function () { return select(this); };    var links = $(obj).find('ul.tabnav li a');    links.each(function (index) { $(this).click(onclick); });    select(links[0]);}$(function () {    $(".tabs").each(function () {        Tabs(this)    });});$(function () {    $("#testimonials").fancybox({        'width': 990,        'height': 800,        'autoScale': false,        'transitionIn': 'none',        'transitionOut': 'none',        'type': 'iframe',        'showCloseButton': false    });	$("#testimonials2").fancybox({        'width': 990,        'height': 800,        'autoScale': false,        'transitionIn': 'none',        'transitionOut': 'none',        'type': 'iframe',        'showCloseButton': false    });//add more here});$(function () {    var addScript = function (url) {        var script = document.createElement("script");        script.type = "text/javascript";        script.src = url;        $('body').append(script);    }        //heat map script    addScript("http://counter.goingup.com/track/heatmap/clickheat.js?st=mpzcsjp");    var img = new Image();    img.src = "http://counter.goingup.com/default.php?st=mpzcsjp&amp;b=5";});function hide(layerName) {	document.getElementById(layerName).style.display="none";}function show(layerName) {	document.getElementById(layerName).style.display="block";}$(document).ready(function(){	$("li").click(function () {		$(".selected").removeClass("selected");      	$(this).addClass("selected");	});  });
