function details(text, text1, text2){		
	var title = "<font class='location-title'>" + text + "</font>";		
	var location = "<p class='contact'><b>Location:</b><br/>";			
	location += text1 + "</p>";		
	var contact = "<p class='contact'><b>Contact Details:</b><br/>";
	contact += text2 + "</p>";
	
	var details = title + location + contact;
	if(text != "" || text1 != "" || text2 != ""){		
		document.getElementById("contact").innerHTML=details;
	}
}

function multidetails(region, locations, text1, text2){
	var titles = locations.split("#");
	var location = text1.split("#");
	var contact = text2.split("#");
	var contacts = "";
		for(x=0; x < titles.length; x++){
			contacts += "<table border='0' width='220'><tr><td><p class='contact'>";
			contacts += "<a href='javascript:show("+x+", "+titles.length+")' class='sub-title'>" + titles[x] + "</a><br/>";
			contacts += "<table border='0' id='"+x+"' style='display:none;'><tr><td>";
			contacts += "<p class='contact'><b>Location:</b><br/>" + location[x] + "</p>";
			contacts += "<p class='contact'><b>Contact Details:</b><br/>" + contact[x] + "</p>";
			contacts += "</td></tr></table>";
			contacts += "</p></td></tr></table>";
		}	
	var all = "<font class='location-title'>" + region + "</font>" + contacts;	
	document.getElementById("contact").innerHTML=all;		
}

function show(x, total){		
	var obj = document.getElementById(x).style.display;
	if(obj == "none"){
		document.getElementById(x).style.display="block";
	}else{		
		document.getElementById(x).style.display="none";
	}
	for(i=0; i < total; i++){
		if(i != x){
			document.getElementById(i).style.display="none";
		}
	}
}

function MM_preloadImages() {					
 var d=document; 
	if(d.images){ 
		if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
		for(i=0; i<a.length; i++)
			if (a[i].indexOf("#")!=0){
				d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
			}
		}
}