/*-----------------------------------------------------------------------------------------------------*/    
    function WriteHTML(ID, Text){
        document.getElementById(ID).innerHTML = Text;
    }
    
    
    function getQueryVariable(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i=0;i<vars.length;i++) {
            var pair = vars[i].split("=");
            if (pair[0] == variable) {
              return pair[1];
            }
        } 
      //alert('Query Variable ' + variable + ' not found');
    }
    
    function getFilenameFromURL(){
        var URL = document.URL;
        var Index = URL.lastIndexOf("/");
        return URL.subStr(Index);
        
    }
    
    function GetDateTime()
    {
       var currentTime = new Date()      
       var month = currentTime.getMonth();
       var day = currentTime.getDate();
       var year = currentTime.getFullYear();
       var minutes = currentTime.getMinutes();
       var hours = currentTime.getHours();
        
       if (hours < 10) hours = "0" + hours;
       if (minutes < 10) minutes = "0" + minutes;
        
       return GetMonth(month) + " " + day + " " + year + " " + hours + ":" + minutes;
    }
    
    function GetMonth(intMonth)
    {
    var MonthArray = new Array("January", "February", "March",
                               "April", "May", "June",
                               "July", "August", "September",
                               "October", "November", "December") 
    return MonthArray[intMonth] 	  	 
    }


    function getStyle(el,styleProp)
    {
        var x = document.getElementById(el);
	    if (x.currentStyle)
		    var y = x.currentStyle[styleProp];
	    else if (window.getComputedStyle)
		    var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
	    return y;
    }

    // Set a style property
    function setStyle(i, p, v) {
	    var n = document.getElementById(i);
	    n.style[p] = v;
    }

