if (document.images) {
    servicesup       = new Image(); servicesup.src   = "http://ifcnow.org/images/menu/menu-1.gif" ;
    servicesdown     = new Image(); servicesdown.src = "http://ifcnow.org/images/menu/menu-1-hover.gif" ;
	
	questionsup       = new Image(); questionsup.src   = "http://ifcnow.org/images/menu/menu-2.gif" ;
    questionsdown     = new Image(); questionsdown.src = "http://ifcnow.org/images/menu/menu-2-hover.gif" ;
	
	planningup       = new Image(); planningup.src   = "http://ifcnow.org/images/menu/menu-3.gif" ;
    planningdown     = new Image(); planningdown.src = "http://ifcnow.org/images/menu/menu-3-hover.gif" ;
	
	articlesup       = new Image(); articlesup.src   = "http://ifcnow.org/images/menu/menu-4.gif" ;
    articlesdown     = new Image(); articlesdown.src = "http://ifcnow.org/images/menu/menu-4-hover.gif" ;
	
	aboutup       = new Image(); aboutup.src   = "http://ifcnow.org/images/menu/menu-5.gif" ;
    aboutdown     = new Image(); aboutdown.src = "http://ifcnow.org/images/menu/menu-5-hover.gif" ;
}
function buttondown( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "down.src" );
    }
}
function buttonup ( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "up.src" );
    }
}

 // script from creditsolutions.com
 var initialtime = new Date();
 var intervalsec = 5.86;
 var initialdollars = 122610000 + (((initialtime.getTime() / 1000) - 1239051997) * intervalsec);
 var initialsec = (initialtime.getTime() / 1000);
 var indextime = new Date();
 var presentsec = (indextime.getTime() / 1000);
 var compsec = presentsec;
 function addCommas(nStr) { 
 	nStr += '';
 	x = nStr.split('.');
 	x1 = x[0];
 	x2 = x.length > 1 ? '.' + x[1] : '';
 	var rgx = /(\d+)(\d{3})/;
 	while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2');}
 	return x1 + x2;
 }
 function startDebt() { 
 	indextime = new Date();
 	presentsec = (indextime.getTime() / 1000);
 	secdif = presentsec - initialsec;
 	totalcash = Math.round((initialdollars + (secdif * intervalsec)) * 100) / 100;
 	if ((Math.round(totalcash * 10) / 10) == (Math.round(totalcash * 100) / 100)) addzero = "0";
 	else addzero = "";
 	if (Math.round(totalcash) == totalcash) addzero = ".00";
 		dynField = document.getElementById("debtresolved");
 		cashstring = totalcash.toString();
 		cashstring = cashstring + addzero;
 		if (dynField != null) { 
			dynField.innerHTML = "$" + addCommas(totalcash) + addzero;
 		}
 	window.setTimeout("startDebt()", 150);
 }
 
 startDebt();
 
 // Others
 
 function setCookie(c_name,value,expiredays){
	var exdate=false;
	if(expiredays!=null && expiredays){	exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); extime=exdate.toGMTString(); }
	document.cookie=c_name+"="+escape(value)+(exdate ? ";expires="+extime : '')+'; path=/';
}
function getCookie(c_name){
	var cookies=document.cookie.split(';');
	for(i in cookies){
		tmp_cookie=cookies[i].split('=');
		cookie_name=tmp_cookie[0].replace(/^\s+|\s+$/g, '');
		if(cookie_name==c_name){
			cookie_value=tmp_cookie.length?unescape(tmp_cookie[1].replace(/^\s+|\s+$/g,'')):1;
			return cookie_value;
			break;
		}
	}
	return null;
}
function hide(obj){
	ch_disp(obj,0);
}
function show(obj){
	ch_disp(obj,1);
}
function ch_disp(obj,x){
	if(typeof obj == 'string'){
		var obj=obj.split(',');
		for(sh in obj){ if(window.$(obj[sh]))$(obj[sh]).style.display=x?"block":"none"; }
	}else if(typeof obj == 'object'){
		obj.style.display=x?"block":"none";
	}
}
function $(){
  return document.getElementById(arguments[0]);
}
