
var imgButton = new Array(7); //array to hold the images
							 
							 
var imgCounter=0;
imgButton[0] = new Image();
imgButton[0].src = "images/icon_actions_in_memoriam.gif";

imgButton[1] = new Image();
imgButton[1].src = "images/icon_actions_gift.gif";
							
imgButton[2] = new Image();
imgButton[2].src = "images/icon_actions_in_honor.gif";
							
imgButton[3] = new Image();
imgButton[3].src = "images/icon_actions_network.gif";
							
imgButton[4] = new Image();
imgButton[4].src = "images/icon_actions_volunteer.gif";
							
imgButton[5] = new Image();
imgButton[5].src = "images/icon_actions_recute_friends.gif";
							
imgButton[6] = new Image();
imgButton[6].src = "images/icon_actions_story.gif";
							     
							
function ImgArrayChange(counter)
{
	var altStr = "";
	
	imgCounter += counter;
	if (imgCounter < 0)
	    imgCounter = 6;  
	if (imgCounter > 6)
		imgCounter = 0;

	switch(imgCounter)
	{
	case 0:
	  altStr = "In Memoriam";
	  document.getElementById("imgButton").setAttribute('href','Give.asp')
	 break;    
	case 1:
	  altStr = "Gift";
	  document.getElementById("imgButton").setAttribute('href','Give.asp')
	  break; 
	case 2:
	  altStr = "In Honor";
	  document.getElementById("imgButton").setAttribute('href','Give.asp')
	  break; 
	case 3:
	  altStr = "Network";
	  document.getElementById("imgButton").setAttribute('href','Network.asp')
	  break; 
	case 4:
	  altStr = "Volunteer";
	  document.getElementById("imgButton").setAttribute('href','Volunteer.asp')
	  break; 
	case 5:
	  altStr = "Network";
	  document.getElementById("imgButton").setAttribute('href','RecuteFriends.asp')
	  break; 
	case 6:
	  altStr = "Story";
	  document.getElementById("imgButton").setAttribute('href','Story.asp')
	  break; 	  	  	  
	}

	document.imgButtonArray.src = imgButton[imgCounter].src;
	document.imgButtonArray.title = altStr;
	
}

							
function changeIMG(obj,IMG)
 {
  obj.src = IMG; 
 }

function ChangeTab(iTab) 
{
	if (iTab==1)
	{
		//MenuTabDoGood was selected
		document.getElementById("TabDoGood").style.display = 'block';
		document.getElementById("TabYourGoodersEmpty").style.display = 'none';
		document.getElementById("TabYourGooders").style.display = 'none';
		document.getElementById("AboutUs").style.display = 'none';
		//document.getElementById("MenuTabDoGood").style.borderBottom  = '#a3bd1e 1px solid';
		//document.getElementById("MenuTabYourGooders").style.borderBottom  = '#cccccc 1px solid';
		
        document.getElementById("MenuTabDoGood").className  = 'MenuTabDoGoodSelected'
        document.getElementById("MenuAboutUs").className = 'MainAboutUs'
        document.getElementById("MenuTabYourGooders").className = 'MenuTabYourGooders'
}
	else if (iTab==2)
	{	
		//MenuTabYourGooders was selected
		document.getElementById("TabDoGood").style.display = 'none';
		document.getElementById("TabYourGoodersEmpty").style.display = 'none';
		document.getElementById("AboutUs").style.display = 'none';
		document.getElementById("TabYourGooders").style.display = 'block';
		//document.getElementById("MenuTabDoGood").style.borderBottom  = '#cccccc 1px solid';
		//document.getElementById("MenuTabYourGooders").style.borderBottom  = '#006699 1px solid';
		
        document.getElementById("MenuTabDoGood").className  = 'MenuTabDoGood'
        document.getElementById("MenuAboutUs").className = 'MainAboutUs'
        document.getElementById("MenuTabYourGooders").className = 'MenuTabYourGoodersSelected'
        

	}
		else if (iTab==3)
	{	
		//AboutUs was selected
		document.getElementById("TabDoGood").style.display = 'none';
		document.getElementById("TabYourGoodersEmpty").style.display = 'none';
		document.getElementById("TabYourGooders").style.display = 'none';
		document.getElementById("AboutUs").style.display = 'block';
		//document.getElementById("MenuTabDoGood").style.borderBottom  = '#cccccc 1px solid';
		//document.getElementById("MenuTabYourGooders").style.borderBottom  = '#006699 1px solid';
		
        document.getElementById("MenuTabDoGood").className  = 'MenuTabDoGood'
        document.getElementById("MenuTabYourGooders").className = 'MenuTabYourGooders'
        document.getElementById("MenuAboutUs").className = 'MenuAboutUsSelected'
    

	}
	else  if (iTab==0)
	{	
		//MenuTabYourGooders was selected
		document.getElementById("TabDoGood").style.display = 'none';
		document.getElementById("TabYourGooders").style.display = 'none';
		document.getElementById("AboutUs").style.display = 'block';
	    document.getElementById("TabYourGoodersEmpty").style.display = 'block';
		//document.getElementById("MenuTabDoGood").style.borderBottom  = '#cccccc 1px solid';
		//document.getElementById("MenuTabYourGooders").style.borderTop  = '#006699 1px solid';
		//document.getElementById("MenuTabYourGooders").style.borderBottom  = '#006699 1px solid';
		
        document.getElementById("MenuTabDoGood").className  = 'MenuTabDoGood'
        document.getElementById("MenuTabYourGooders").className = 'MenuTabYourGooders'
        document.getElementById("MenuAboutUs").className = 'MainAboutUs'

	}
}

function OpenDiv(DivID)
{
if(document.getElementById(DivID).style.display == 'none')
	document.getElementById(DivID).style.display = 'inline'
else
	document.getElementById(DivID).style.display = 'none'
}


// Set the input argument to true to enable the window feature
	function winOpen(URL, windowName, width, height, resizable, location, menubar, scrollbars, status, toolbar){
		var windowFeatures;
		windowFeatures = '';
		if (width != '' && width != null){
			windowFeatures = windowFeatures+'width='+width+',';
		}
		if (height != '' && height != null){
			windowFeatures = windowFeatures+'height='+height+',';
		}
		if (resizable){
			windowFeatures = windowFeatures+'resizable,';
		}
		if (location){
			windowFeatures = windowFeatures+'location,';
		}
		if (menubar){
			windowFeatures = windowFeatures+'menubar,';
		}
		if (scrollbars){
			windowFeatures = windowFeatures+'scrollbars,';
		}
		if (status){
			windowFeatures = windowFeatures+'status,';
		}
		if (toolbar){
			windowFeatures = windowFeatures+'toolbar,';
		}
		window.open(URL, windowName, windowFeatures);
	}


	function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
	if(window.screen)if(isCenter)if(isCenter=="true"){
	var myLeft = (screen.width-myWidth)/2;
	var myTop = (screen.height-myHeight)/2;
	features+=(features!='')?',':'';
	features+=',left='+myLeft+',top='+myTop;
	}
	window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
	}


function pasteInput(obj,txt)
 {
  if(obj.value == '')
	{
		obj.value = txt;
	}
 }
 
function clearInput(obj,txt)
 {
  if(obj.value == txt)
	{
		obj.value = "";
	}
 }


////////-------------------------------------romi
function enableTooltips(id){
var links,i,h;
if(!document.getElementById || !document.getElementsByTagName) return;
AddCss();
h=document.createElement("span");
h.id="btc";
h.setAttribute("id","btc");
h.style.position="absolute";
document.getElementsByTagName("body")[0].appendChild(h);
if(id==null) links=document.getElementsByTagName("a");
else links=document.getElementById(id).getElementsByTagName("a");
for(i=0;i<links.length;i++){
    Prepare(links[i]);
    }
}

function Prepare(el){
var tooltip,t,b,s,l;
t=el.getAttribute("title");
if(t==null || t.length==0) t="link:";
el.removeAttribute("title");
tooltip=CreateEl("span","tooltip");
s=CreateEl("span","top");
s.appendChild(document.createTextNode(t));
tooltip.appendChild(s);
b=CreateEl("b","bottom");
l=el.getAttribute("href");
if(l.length>30) l=l.substr(0,27)+"...";
b.appendChild(document.createTextNode(l));
tooltip.appendChild(b);
setOpacity(tooltip);
el.tooltip=tooltip;
el.onmouseover=showTooltip;
el.onmouseout=hideTooltip;
el.onmousemove=Locate;
}
//----------------------------------------
function enableTooltips_(id){
var links,i,h;
if(!document.getElementById || !document.getElementsByTagName) return;
AddCss();
h=document.createElement("span");
h.id="btc";
h.setAttribute("id","btc");
h.style.position="absolute";
document.getElementsByTagName("body")[0].appendChild(h);
if(id==null) links=document.getElementsByTagName("a");
else links=document.getElementById(id).getElementsByTagName("a");
for(i=0;i<links.length;i++){
    Prepare_(links[i]);
    }
}

//------------------------------------ NPOUpdate
function Prepare_(el){
var tooltip,t,b,s,l;
var st;
t=el.getAttribute("title");

if(t==null || t.length==0 || t == "")
//t="message:"
t=""
el.removeAttribute("title");
tooltip=CreateEl("span","tooltip");
s=CreateEl("span","top");
s.appendChild(document.createTextNode(t));
tooltip.appendChild(s);
b=CreateEl("b","bottom");

l=el.getAttribute("name");
if(el.getAttribute("id") == "activityA") //validation for an email
{
st =  "You can mark more than one"
l=st;
 }

 else if(el.getAttribute("id") == "goalA") 
{

st = "What the project wants to achieve."
l=st;
 }
  else if(el.getAttribute("id") == "ObjectivesA") 
{

st = "What you do to achieve the goal."
l=st;
 }  
 else if(el.getAttribute("id") == "NeedA") 
{

st = "Explain the problem that the project addresses, give data."
l=st;
 } 
 else if(el.getAttribute("id") == "UniquenessA") 
{

st = "What makes this project different and special?"
l=st;
 } 
 else if(el.getAttribute("id") == "TargetA") 
{

st = "You can mark more than one"
l=st;
 } 
 else if(el.getAttribute("id") == "VisionA") 
{

st = "What the organization want to be"
l=st;
 } 
 else if(el.getAttribute("id") == "MissionA") 
{

st = "Why we exist. What we want to be."
l=st;
 } 
 else if(el.getAttribute("id") == "NPOObjectivesA") 
{

st = "What the organization is doing to achieve its mission"
l=st;
 } 
 else if(el.getAttribute("id") == "AreaActivityA") 
{

st = "You can mark more than one"
l=st;
 }
  else if(el.getAttribute("id") == "Vision_HebA") 
{

st = "מה מטרת העמותה"
l=st;
 }
   else if(el.getAttribute("id") == "Mission_HebA") 
{

st = "?איזה עמותה קיימת"
l=st;
 }
  else if(el.getAttribute("id") == "Objectives_HebA") 
{

st = "איך העמותה תשיג את מטרתה"
l=st;
 }
  else if(el.getAttribute("id") == "Goal_HebA") 
{

st = "What the project wants to achieve."
l=st;
 }
  else if(el.getAttribute("id") == "Need_HebA") 
{

st = "Explain the problem that the project addresses, give data."
l=st;
 }
   else if(el.getAttribute("id") == "Uniqueness_HebA") 
{

st = "What makes this project different and special?"
l=st;
 }
 else if(el.getAttribute("id") == "i1" || el.getAttribute("id") == "i11" || el.getAttribute("id") == "i111" ) 
{
st = "Posting pictures and video clips to create an exciting and intriguing visual experience"
l=st;
 }
  else if(el.getAttribute("id") == "i2" || el.getAttribute("id") == "i22" || el.getAttribute("id") == "i222") 
{
st = "Enable donors to commemorate loved ones on the virtual memorial wall of the project.We suggest 3 levels: \n\n\n\n\n\n\n\n Bronze $100 -$1499,  \n\n\n\n\n\n\n\n  Silver $1500 - $4500,  \n\n\n\n\n\n\n  Gold $4501+.   \n\n\n\n\n\n\n\n  You can choose to adopt our formula or define other levels. "  
l=st;
 }
  else if(el.getAttribute("id") == "i3" || el.getAttribute("id") == "i33" || el.getAttribute("id") == "i333")  
{
st = "Ask your lay leader (chairperson, donor, board member) to place a call for others to join him in support of the project. People like to partner and leverage.  The power of personal appeal is great add picture or video clip"
l=st;
 }
  else if(el.getAttribute("id") == "i4" || el.getAttribute("id") == "i44" || el.getAttribute("id") == "i444")  
{
st = "Generate support for your project by recruiting volunteers to give time and get involved"
l=st;
 }
  else if(el.getAttribute("id") == "i5" || el.getAttribute("id") == "i55" || el.getAttribute("id") == "i555") 
{
st = "Develop social network, create awareness, expose your project, spread the word and create a buzz around it. Assign someone to manage the network"
l=st;
 }
 else
 {
 (l = el.getAttribute("href") )
 }
 
//if(l.length>30) l=l.substr(0,27)+"...";
b.appendChild(document.createTextNode(l));
tooltip.appendChild(b);
setOpacity(tooltip);
el.tooltip=tooltip;
if( el.getAttribute("href")=="undefined" || el.getAttribute("href")=="" || el.getAttribute("href")=="#" )
el.onmouseover=showTooltip;
el.onmouseout=hideTooltip;
el.onmousemove=Locate;
}



//-------------------------------------------------

function showTooltip(e){
var d=document.getElementById("btc");
if(!(d.childNodes.length>0))
d.appendChild(this.tooltip);
Locate(e);
}

function hideTooltip(e){
var d=document.getElementById("btc");
if(d.childNodes.length>0) d.removeChild(d.firstChild);
}

function setOpacity(el){
el.style.fontSize="0.6em"
el.style.filter="alpha(opacity:90)";
el.style.KHTMLOpacity="0.90";
el.style.MozOpacity="0.90";
el.style.opacity="0.90";
}

function CreateEl(t,c){
var x=document.createElement(t);
x.className=c;
x.style.display="block";
return(x);
}

function AddCss(){
var l=CreateEl("link");
l.setAttribute("type","text/css");
l.setAttribute("rel","stylesheet");
l.setAttribute("href","bt.css");
l.setAttribute("media","screen");
document.getElementsByTagName("head")[0].appendChild(l);
}

function Locate(e){
var posx=0,posy=0;
if(e==null) e=window.event;
if(e.pageX || e.pageY){
    posx=e.pageX; posy=e.pageY;
    }
else if(e.clientX || e.clientY){
    if(document.documentElement.scrollTop){
        posx=e.clientX+document.documentElement.scrollLeft;
        posy=e.clientY+document.documentElement.scrollTop;
        }
    else{
        posx=e.clientX+document.body.scrollLeft;
        posy=e.clientY+document.body.scrollTop;
        }
    }
document.getElementById("btc").style.top=(posy+10)+"px";
document.getElementById("btc").style.left=(posx-20)+"px";
}
//validation test for a email address
function test(t)
{
var x,str,st;
	x=document.getElementById("email");
	st = x.value

 if(st == "")
     str = "please enter  email address"
  else if(!((st.indexOf(".") > 2) && (st.indexOf("@") > 0)))
  {
     str = "  email address is not right"
     x.focus()
   }
  else 
      str =" email address is right"

   return str

}
//validation test for a country
//function test_c(t)
//{
//var alphaExp = /^[a-zA-Z]+$/;
//var x,str,st;
//	x=document.getElementById("country");
//	st = x.value

//if(st == "")
 //    str = "please enter  country"
   
    
 //else if(st.match(alphaExp))
 //  str ="entered country is right"    

//else 
//{
//str ="entered country is not right"     
//x.focus()
//    } 
     

 //  return str

//}
//validation test for a gender
function test_g(t)
{
var x,str,st;
	x=document.getElementById("gender");
	st = x.value

 if(st == "")
     str = " enter an organization name"
     
else if( !(st=="male" || st == "female" ))
{
    str = " enter an organization name"
    x.focus()
 }
 else 
     str =" enter an organization name"

   return str

}

function ajaxFunctionGeneral(path,swDebug)
 {  
  s="";
  var xmlHttp;
  var x;
  try
	{    
	// Firefox, Opera 8.0+, Safari    
	xmlHttp=new XMLHttpRequest();    
	}
  catch (e)
	{    
	  // Internet Explorer    
	  try
	  {      
		  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
	  }
	catch (e)
	  {      
	  try
		{
		   xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
		}
	  catch (e)
		{        
		alert("Your browser does not support AJAX!");       
		return false;        
		}      
	  } 
	}
	err=new Error();
	try{
		xmlHttp.open("GET",path,false);
		xmlHttp.send("null");
		s=xmlHttp.responseText;
	   }
	catch(err){alert(err.description);s="";}
	
	if (swDebug==1) window.open(path);
	
	return unescape(s);
	
}


function ajaxFunction(control,controlName,projectVal)
			  {
				if(navigator.userAgent.indexOf("Firefox")!=-1)
					{ 
						alert("Project added to favorite list")
					}														    
			  var xmlHttp;
			  try
				{    
				// Firefox, Opera 8.0+, Safari    
				xmlHttp=new XMLHttpRequest();    
				}
			  catch (e)
				{    
				  // Internet Explorer    
				  try
				  {      
					  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
				  }
				catch (e)
				  {      
				  try
					{
					   xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
					}
				  catch (e)
					{        
					alert("Your browser does not support AJAX!");       
					return false;        
					}      
				  } 
				}
																			
				xmlHttp.onreadystatechange=function()
				  {
				  if(xmlHttp.readyState==4)
					{
																				
				    //document.getElementById("ShowMe").innerHTML=xmlHttp.responseText

					controlValue = control.parentNode.parentNode.childNodes[0].childNodes[0]
					controlValue.innerText ="Added";
					
					//controlValue.innerText=xmlHttp.responseText
				
					}
				  }
																				
																			  
				xmlHttp.open("GET","MyFavoritesAdd.asp?Name="+controlName+"&ProjectID="+projectVal,true) ;
																			
				xmlHttp.send(null);  
}

function ajaxAddFavorites(control,controlName,projectVal)
  {

	if(navigator.userAgent.indexOf("Firefox")!=-1)
		{ 
			alert("Project added to favorite list")
		}														    
  var xmlHttp;
  try
	{    
	// Firefox, Opera 8.0+, Safari    
	xmlHttp=new XMLHttpRequest();    
	}
  catch (e)
	{    
	  // Internet Explorer    
	  try
	  {      
		  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
	  }
	catch (e)
	  {      
	  try
		{
		   xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
		}
	  catch (e)
		{        
		alert("Your browser does not support AJAX!");       
		return false;        
		}      
	  } 
	}
																			
	xmlHttp.onreadystatechange=function()
	  {
	  if(xmlHttp.readyState==4)
		{
																				
	    //document.getElementById("ShowMe").innerHTML=xmlHttp.responseText

		controlValue = control.parentNode.parentNode.childNodes[0].childNodes[controlName]
		controlValue.innerText =" Added";
					
		//controlValue.innerText=xmlHttp.responseText
				
		}
	  }
																				
																			  
	xmlHttp.open("GET","MyFavoritesAdd.asp?Name="+controlName+"&ProjectID="+projectVal,true) ;
																			
	xmlHttp.send(null);  
}

 function setStyle(count)
     {
    
     var cell = document.getElementsByTagName("td")
      for (i=0;i<cell.length;i++)
      {
       controlID = cell(i).id 
       if(controlID.indexOf("Left"  ) != -1  || controlID.indexOf("Right"  ) != -1  )
              cell(i).style.display = 'none'
       if(controlID.indexOf("Left"  +  count   ) != -1  || controlID.indexOf("Right" +  count   ) != -1  )
              cell(i).style.display = 'block'       
              
              
       if(controlID.indexOf("Center"  ) != -1 && controlID.indexOf("Center" +  count  )  == -1 )
      
      
              cell(i).className = 'notSelectedStep'
           
              
       if(controlID.indexOf("Center" +  count  )  != -1 )
      
              cell(i).className = 'selectedStep'
    
     }

     }
     
     function checkedR(radio) {
																		
	 if(radio.name == "inHonor" )
	 {
	   document.theQuestion.inHonor.checked = true
	   document.theQuestion.inMemorian.checked = false
	   document.theQuestion.gift.checked = false
	
	 }
	 if(radio.name == "inMemorian" )
	 {
	   document.theQuestion.inMemorian.checked = true
	   document.theQuestion.inHonor.checked = false
	   document.theQuestion.gift.checked = false
	
	 }
	 if(radio.name == "gift" )
	 {
	   document.theQuestion.gift.checked = true
	   document.theQuestion.inHonor.checked = false
	   document.theQuestion.inMemorian.checked = false
	 
	 }
																		
	}
	function CheckedControl (control,count)
{
  
     var cell = document.getElementsByTagName("input")
      for (i=0;i<cell.length;i++)
      {
       controlID = cell(i).id 
       if(controlID.indexOf("Radio" + count  ) != -1 )
              cell(i).checked=false;
       if(controlID.indexOf("Radio"  +  count   ) != -1 &&  controlID == control.id )
              cell(i).checked=true;     
      
     }

	
}


	
function alignWith(elm,child,pos /*left, */)
{
	var offset=getElementPos(elm);
//	alert(offset);
	switch (pos) 
	{	
		case "l":
		case "left":
			offset[0]-=child.style.posWidth;
			break; 
		case "r":
		case "right":
			offset[0]+=elm.style.posWidth;
			break; 
		case "t":
		case "top"://TotalPrtNotNull.h
			offset[1]-=child.style.height;
			break; 
		case "b":
		case "bottom":
			offset[1]+=elm.style.posHeight;
			break; 
	}
	child.style.position="absolute";
	var param=265;
	var param2=10;
	if	(child==menu4table)param=530;
	
	child.style.posLeft=offset[0]-param;
	child.style.posTop=offset[1]+param2;

}
function ajaxFunctionMain(path)

 {  
											    
			  var xmlHttp;
			  try
				{    
				// Firefox, Opera 8.0+, Safari    
				xmlHttp=new XMLHttpRequest();    
				}
			  catch (e)
				{    
				  // Internet Explorer    
				  try
				  {      
					  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
				  }
				catch (e)
				  {      
				  try
					{
					   xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
					}
				  catch (e)
					{        
					alert("Your browser does not support AJAX!");       
					return false;        
					}      
				  } 
				}
																			
				xmlHttp.onreadystatechange=function()
				  {
				  if(xmlHttp.readyState==4)
					{
				
					}
				  }
				//alert(path)															  
				xmlHttp.open("GET"," + path + ",true) ;
																			
				xmlHttp.send(null);  
}


function ajaxDonateRemove(control,param1,param2)

 {  
											    
			  var xmlHttp;
			  try
				{    
				// Firefox, Opera 8.0+, Safari    
				xmlHttp=new XMLHttpRequest();    
				}
			  catch (e)
				{    
				  // Internet Explorer    
				  try
				  {      
					  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
				  }
				catch (e)
				  {      
				  try
					{
					   xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
					}
				  catch (e)
					{        
					alert("Your browser does not support AJAX!");       
					return false;        
					}      
				  } 
				}
																			
				xmlHttp.onreadystatechange=function()
				  {
				  if(xmlHttp.readyState==4)
					{
					
				      //controlValue = control.parentNode.parentNode.childNodes[2]
				
					 //controlValue.innerText ="deleted";
				     		
					}
				  }
																  
				xmlHttp.open("GET","DonateDelete.asp?param1="+param1+"&param2="+param2,true) ;
																			
				xmlHttp.send(null);  
}		

function ajaxFunctionMain1(control,param1,param2)

 {  
											    
			  var xmlHttp;
			  try
				{    
				// Firefox, Opera 8.0+, Safari    
				xmlHttp=new XMLHttpRequest();    
				}
			  catch (e)
				{    
				  // Internet Explorer    
				  try
				  {      
					  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
				  }
				catch (e)
				  {      
				  try
					{
					   xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
					}
				  catch (e)
					{        
					alert("Your browser does not support AJAX!");       
					return false;        
					}      
				  } 
				}
																			
				xmlHttp.onreadystatechange=function()
				  {
				  if(xmlHttp.readyState==4)
					{
					
				      controlValue = control.parentNode.parentNode.childNodes[2]
				
					 controlValue.innerText ="saved";
				     		
					}
				  }
																  
				xmlHttp.open("GET","DonateSave.asp?param1="+param1+"&param2="+param2,true) ;
																			
				xmlHttp.send(null);  
}		
/// validation 
function testVerify(control,num)
{
string = control.value
id = control.id

if( string.length < num)
{
control.value = ""
document.getElementById(id).focus();

alert("please enter more than " + num + " characters")
return false;
}

}

  var chkDot = true;
   var usEmail = true;
//=======================================================================   
   function CheckEmail() 
   { 
   eAddr= document.getElementById("Email").value
   
      var lenSuffix = (usEmail) ? 4 : 3;
      var result = false;
      var ndxAt = ndxDot =  0;
          
      ndxAt  = eAddr.indexOf("@");
      ndxDot = eAddr.indexOf(".") ;
      ndxDot2 = eAddr.lastIndexOf(".") ;
          
      if ((ndxDot < 0) || (ndxAt < 0))
      {
         alert("Your email address lacks '.' or '@'. \n\nThe format is 'you@dom.suf'");
         eAddr = "" 
         
       }      
      else if (chkDot && (ndxDot < ndxAt) )
      {
         chkDot = !( 
            confirm("You entered a 'dot' before the '@'\nAre you sure that is   right?") );
        eAddr = ""  
      } 
      else if ( (ndxDot2 - 3) <= ndxAt)
      {
         alert("You may be missing your domain name.  \n\nThe format is 'you@dom.suf'");
         eAddr = "" 
      } 
  
      else 
           result=true; 
          
      return result; 
   } 
   //========================================================
    function  validEmail(control) 
   { 
   eAddr= control.value
   
      var lenSuffix = (usEmail) ? 4 : 3;
      var result = false;
      var ndxAt = ndxDot =  0;
          
      ndxAt  = eAddr.indexOf("@");
      ndxDot = eAddr.indexOf(".") ;
      ndxDot2 = eAddr.lastIndexOf(".") ;
          
      if ((ndxDot < 0) || (ndxAt < 0))
      {
         alert("Your email address lacks '.' or '@'. \n\nThe format is 'you@dom.suf'");
         eAddr = "" 
         
       }      
      else if (chkDot && (ndxDot < ndxAt) )
      {
         chkDot = !( 
            confirm("You entered a 'dot' before the '@'\nAre you sure that is   right?") );
        eAddr = ""  
      } 
      
      else 
           result=true; 
          
      return result; 
   } 
   
   //=========================================================
   
    function clearCheck(control)
{
  id = control.id
  var cell = document.getElementsByTagName("input")
   
     for (i=0;i<cell.length;i++)
    {
      cell(i).checked=false;
     if( cell(i).id == id   )
		 cell(i).checked=true;
	
		}
	//alert(cell.length)	
	//alert(document.getElementById(control.id).checked)
}	

function ajaxFunctionNewAmount(param1,iCartID,param2)
			  {
																		    
			  var xmlHttp;
			  try
				{    
				// Firefox, Opera 8.0+, Safari    
				xmlHttp=new XMLHttpRequest();    
				}
			  catch (e)
				{    
				  // Internet Explorer    
				  try
				  {      
					  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
				  }
				catch (e)
				  {      
				  try
					{
					   xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
					}
				  catch (e)
					{        
					alert("Your browser does not support AJAX!");       
					return false;        
					}      
				  } 
				}
																			
				xmlHttp.onreadystatechange=function()
				  {
				  if(xmlHttp.readyState==4)
					{
																				
				 //alert(path)
				
					}
				  }
																				
																			  
				xmlHttp.open("GET","DonateAmountU.asp?param1="+param1+"&CartID="+iCartID+"&param2="+param2,true) ;
																			
				xmlHttp.send(null);  
}

//=========================================================================

function ajaxFunctionCheckEmail (control)
 {
			  
			 // alert(control.value)
			  
												    
			  var xmlHttp;
			  try
				{    
				// Firefox, Opera 8.0+, Safari    
				xmlHttp=new XMLHttpRequest();    
				}
			  catch (e)
				{    
				  // Internet Explorer    
				  try
				  {      
					  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
				  }
				catch (e)
				  {      
				  try
					{
					   xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
					}
				  catch (e)
					{        
					alert("Your browser does not support AJAX!");       
					return false;        
					}      
				  } 
				}
																			
				xmlHttp.onreadystatechange=function()
				  {
				  if(xmlHttp.readyState==4)
					{
																				
				    //document.getElementById("ShowMe").innerHTML=xmlHttp.responseText
					controlValue = control.parentNode.parentNode.childNodes[2]
				  //  alert(controlValue.value)
				  
					controlValue.innerText =xmlHttp.responseText
					if(controlValue.innerText !="" )
					{
					control.value = ""
					control.parentNode.parentNode.childNodes[1].childNodes[0].innerText =""
				    return false;
				    }
					}
				  }
																				
																			  
				xmlHttp.open("GET","CheckEmail.asp?CheckEmail="+control.value,true) ;
																			
				xmlHttp.send(null);  
}

//====================================================================================


function ajaxFunctionCheckEmailMain (control)
 {
													    
			  var xmlHttp;
			  try
				{    
				// Firefox, Opera 8.0+, Safari    
				xmlHttp=new XMLHttpRequest();    
				}
			  catch (e)
				{    
				  // Internet Explorer    
				  try
				  {      
					  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
				  }
				catch (e)
				  {      
				  try
					{
					   xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
					}
				  catch (e)
					{        
					alert("Your browser does not support AJAX!");       
					return false;        
					}      
				  } 
				}
																			
				xmlHttp.onreadystatechange=function()
				  {
				  if(xmlHttp.readyState==4)
					{
																				
				    //document.getElementById("ShowMe").innerHTML=xmlHttp.responseText
					controlValue = control.parentNode.parentNode.parentNode.childNodes[2].childNodes[0]
				    //alert(controlValue.id)
				  
					controlValue.innerText =xmlHttp.responseText
					if(controlValue.innerText !="" )
					{
					control.value = ""
					//control.parentNode.parentNode.childNodes[1].childNodes[0].innerText =""
				    return false;
				    }
					}
				  }
																				
																			  
				xmlHttp.open("GET","CheckEmail.asp?CheckEmail="+control.value,true) ;
																			
				xmlHttp.send(null);  
}

//====================================================================================
	  function clearCheckControl(control)
{
  id = control.id
  var cell = document.getElementsByTagName("input")
   
     for (i=0;i<cell.length;i++)
    {
      cell(i).checked=false;
     if( cell(i).id == id   )
		 cell(i).checked=true;
	
		}
	
}
//====================================================================================

   //========================================================
    function  validEmail1(control) 
   { 
   eAddr= control.value    
   
      var lenSuffix = (usEmail) ? 4 : 3;
      var result = false;
      var ndxAt = ndxDot =  0;
          
      ndxAt  = eAddr.indexOf("@");
      ndxDot = eAddr.indexOf(".") ;
      ndxDot2 = eAddr.lastIndexOf(".") ;
          
      if ((ndxDot < 0) || (ndxAt < 0))
      {
         document.getElementById("lblLoginEmail").innerHTML = "Your email address lacks '.' or '@'. \n\nThe format is 'you@dom.suf'"
         // alert("Your email address lacks '.' or '@'. \n\nThe format is 'you@dom.suf'");
         document.getElementById("LoginEmail").value = ""
        
         eAddr = "" 
         
       }      
      //else if (chkDot && (ndxDot < ndxAt) )
      //{
     //  document.getElementById("lblLoginEmail").innerHTML = "You entered a 'dot' before the '@'\nAre you sure that is   right?"
     //   // chkDot = !( 
    //   //     confirm("You entered a 'dot' before the '@'\nAre you sure that is   right?") );
    //    document.getElementById("LoginEmail").value = ""
    //    eAddr = ""  
      
    //  } 
    //  else if ( (ndxDot2 - 3) <= ndxAt)
    //  {
    //     document.getElementById("lblLoginEmail").innerHTML = "You may be missing your domain name.  \n\nThe format is 'you@dom.suf'"
    //    // alert("You may be missing your domain name.  \n\nThe format is 'you@dom.suf'");
    //    document.getElementById("LoginEmail").value = ""
     //    eAddr = "" 
      
    //  } 
  
      else 
      {
          document.getElementById("lblLoginEmail").innerHTML = ""
           result=true; 
       }
      return result; 
   } 
   
   //=========================================================
		