var remote = null;

/*

	Show a new window

	n: window name

	u: url

	w: width

	h: height

*/
function ShowWindow(n,u,w,h)
{
	args="width="+w+",height="+h+",titlebar=no,menubar=no,toolbar=no,directories=no,resizable=yes,scrollbars=yes,status=0";
	remote=window.open(u,n,args);
	if (remote != null)
	{
	    if (remote.opener == null)
	    		remote.opener =self;
		window.name='MyWindow';
		remote.location.href=u;
	}
	remote.focus();
}
/*
	open url
*/
function open_url(aurl,m,w,h)
{
	var currTime= new Date();
	var newurl=aurl;
	/* Open in the same window */

	if (m==0)
	{
		// window.open(newurl,"_self");
		self.location.href = newurl;
	}

	else
	{
		/* Open in the a new window */

		ShowWindow('windowname1',newurl,w,h);	
	}

}
function change_language(aurl,m)
{

    var obj = document.getElementById("id_lang");  
		var selIndex = obj.selectedIndex;
    var newurl = aurl + '&language=' + obj.options[selIndex].value;
  
    self.location.href = newurl;
}

function show_map(s_name,s_address,phone,fax,email)
{
 // alert(s_address + " - " + phone+ " - " +fax+ " - " +email);
  var newurl="/show_map.php?s_name=" + s_name + "&s_address=" + s_address + "&s_phone=" + phone + "&s_fax=" + fax+ "&s_email=" + email;
 //alert(newurl);
 	ShowWindow('windowname1',newurl,"1000","1000");   
}


