﻿      function testFunction(){
            alert('This is it');
       }
        function displayStaticMessage(messageContent,cssClass)
        {
            alert("I'm in the method"); messageObj = new DHTML_modalMessage();	// We only create one object of this class
        messageObj.setShadowOffset(5);	// Large shadow
    	
            messageObj.setHtmlContent(messageContent);
	        messageObj.setSize(300,150);
	        messageObj.setCssClassMessageBox(cssClass);
	        messageObj.setSource(false);	// no html source since we want to use a static message here.
	        messageObj.setShadowDivVisible(false);	// Disable shadow for these boxes	
	        messageObj.display();
        }
        
        function fixFormTag(){
            var formVar = document.getElementById("aspnetForm");
            var actionString = formVar.action;            
            var regex = new RegExp("(.*?[^/])\/((.+)?\.aspx)");
            var matches = actionString.match(regex);
            if (matches != null && matches.length > 1){
                actionString= matches[1] + "/" + matches[2];               
            }else{
                regex = new RegExp("((.+)?\.aspx)");
                matches = actionString.match(regex);
                if (matches != null && matches.length > 1){
                       actionString= "/" + matches[1];               
                }
            }
            formVar.action = actionString;
        }
   

    function ifEnterSubmit(e){   
        if (e == null) {
            e = window.event;
        }
        if (e.keyCode ==13 || e.keyCode ==10){
            
            submitSearch();
        }
    }
    function submitSearch(){
        document.forms["frmSearch"].submit();
    }