function loadjsfile(filename, filetype){
 if (filetype=="js"){ //if filename is a external JavaScript file
  var fileref=document.createElement('script')
  fileref.setAttribute("type","text/javascript")
  fileref.setAttribute("src", filename)
 }
 else if (filetype=="css"){ //if filename is an external CSS file
  var fileref=document.createElement("link")
  fileref.setAttribute("rel", "stylesheet")
  fileref.setAttribute("type", "text/css")
  fileref.setAttribute("href", filename)
 }
 if (typeof fileref!="undefined"){
  document.getElementsByTagName("head")[0].appendChild(fileref)
 }
}

loadjsfile("http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js", "js");

var jQ = jQuery.noConflict();
jQ(document).ready(function() {
	jQ('#display').css("border-top", "1px solid #000");
	jQ('#display').css("border-bottom", "1px solid #000");
	jQ('#display').slideUp();

	jQ('#setLocation').click(function() {
	  jQ('#display').slideToggle();
	  getCombo('Country','');
	});
});


 function getCombo(type, value) {
	 //alert(type, value);
	 //jQ('#display').slideDown();
	 jQ.get("http://www.mumineen.org/select_salaat_process.php", {combo: type, sel: value},
		function(data){
	  		//alert("Data Loaded: " + data);
			document.getElementById('display').innerHTML = data;
  		});
 }

 function setCity(type, value) {
	 	 //alert(type, value);
	 jQ.get("http://www.mumineen.org/select_salaat_process.php", {combo: type, sel: value},
		function(data){
	  		//alert("Selected City has been set " + data);
			document.getElementById('salaattable').innerHTML = data;
			jQ('#salaattable').slideDown;
  		});
	jQ('#display').slideUp();
	jQ('salaatRss').attr("href","http://www.mumineen.org/salaat/salaat_feed.php/"+value);
 }

function select_location(url){
	win2=window.open(url,"","status=0,width=450,height=300,scrollbars")
	win2.creator=self
	win2.moveTo(300,300)
}

