﻿var this_weekday_name_array = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")	//predefine weekday names
        var this_month_name_array = new Array("January","February","March","April","May","June","July","August","September","October","November","December")	//predefine month names

        var this_date_timestamp=new Date()	//get current day-time stamp

        var this_weekday = this_date_timestamp.getDay()	//extract weekday
        var this_date = this_date_timestamp.getDate()	//extract day of month
        var this_month = this_date_timestamp.getMonth()	//extract month
        var this_year = this_date_timestamp.getYear()	//extract year

        if (this_year < 1000)
	        this_year+= 1900;	//fix Y2K problem
        if (this_year==101)
	        this_year=2001;		//fix Netscape browsers - it displays the year as being the year 101!

        var this_date_string = this_weekday_name_array[this_weekday] + ", " + this_month_name_array[this_month] + " " + this_date + ", " + this_year	//concat long date string

            function GetCurrentDateTime() 
            {
                    document.getElementById("tdDate").innerText =  this_date_string;
            }
            
            
            
            



function toggleDiv(id,flag) {
    var ev = window.event;
    
    var tempX = 0
    var tempY = 0
    
    tempX = ev.screenY + document.body.scrollLeft;
    tempY = ev.screenY + document.body.scrollTop +150;
    
    if (tempX < 0){tempX = 0}
    if (tempY < 0){tempY = 0}  
  
    //alert(tempY);
    if(id == 'div4')
    {        
        document.getElementById(''+id+'').style.left= ev.offsetX-100;
        document.getElementById(''+id+'').style.top = ev.offsetY;
        }
    else 
    {   
        document.getElementById(''+id+'').style.left= tempX;
        document.getElementById(''+id+'').style.top = tempY;
        }
        
    if (flag=="1")
    {
        if (document.layers) document.layers[''+id+''].visibility = "show"
        else if (document.all) document.all[''+id+''].style.visibility = "visible"
        else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
    }
    else
        if (flag=="0")
        {
            if (document.layers) document.layers[''+id+''].visibility = "hide"
            else if (document.all) document.all[''+id+''].style.visibility = "hidden"
            else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
        }
}






    function showmessage(msg)
        {            
            var msg1 = '';
            if(msg == 'link')
            {
                msg1 = 'Links are provided for your convenience and additional information. However, during this early phase of Chagora deployment in order to utilize your Chagora account and gain it is advantages, contributions must be through this platform. Chagora is neutral and free!...(financially equivalent for both donor and recipient to contribution directly through a recipient website). Chagora monetization (how it pays for itself) is NOT dependent on additional charges to either Donors OR Recipients.';
                document.getElementById("tooltip").style.width ="450px";
                document.getElementById("tooltip").style.left = event.x-150;
                document.getElementById("tooltip").style.top = event.offsetY+150;
            }
            
            if(msg == 'amount')
            {
                msg1 = 'Please Sign-In or Create Account';
                document.getElementById("tooltip").style.width ="210px";
                document.getElementById("tooltip").style.left = event.x;
                document.getElementById("tooltip").style.top = event.y+5;
            }
            
            document.getElementById("tooltip").innerHTML = msg1;
            document.getElementById("tooltip").style.textAlign = "justify";
            document.getElementById("tooltip").style.paddingLeft = "10px";
            document.getElementById("tooltip").style.paddingRight = "10px";
            document.getElementById("tooltip").style.visibility = "visible";
                                   
            return false;
        }
        function hidemessage()
        {
            document.getElementById("tooltip").style.visibility = "hidden";
        }
        
        
        
        
        
        function showTooltip(e) 
          {                             
              var obj = e; //document.getElementById("ctl00_DefaultContent_Contribute1_type1");
              
              if(obj.options[obj.selectedIndex].value == 2)
                document.getElementById("tooltip").innerHTML = "non tax-deductible contribution";
              if(obj.options[obj.selectedIndex].value == 3)
                document.getElementById("tooltip").innerHTML = "tax-deductible contribution";
                
              //alert(event.type);
              //event.type == "mouseleave" 
              
               document.getElementById("tooltip").style.visibility = "visible";
               document.getElementById("tooltip").style.top = event.y-35;
               document.getElementById("tooltip").style.left = event.x;              
               document.getElementById("tooltip").style.width ="200px";
          }
          
          
        function HideTooltip() 
          {            
            document.getElementById("tooltip").style.visibility = "hidden";            
          }  
          
          
          
          
          
          
          
          
          
    function funfloat(e)
        {   var unicode=e.charCode? e.charCode : e.keyCode;
            if (unicode!=8) 
            { if ((unicode<48 || unicode>57) && (unicode != 46)) 
                { return false; } 
            } 
        }
