function ViewForgotDiv()
{
	el = document.getElementById('divforgot');
	if (el.style.display == 'none')
		el.style.display  = "block";
	else	
		el.style.display  = "none";

}

function ChangeLang()
{
	document.changeLang.submit();
}

function MakeOn(url)
{
//	var expand = document.getElementById('expand');
//	url = url+"&expand="+expand.value;
	location.href=url;
}

function DopImg()
{
        targetId="dopimg";
        targetElement = document.getElementById(targetId);
	if (targetElement.style.display == "none")
	        targetElement.style.display= "";
	else targetElement.style.display = "none";
	location.href = "#dopimg";
}

function open_window(url)
{
	cwin = window.open(url,"attach","width=350,height=400,toolbar=no,resizable=yes");
}

function ViewResume(id)
{
	var targetId = "res"+id;
	var buf = document.getElementById(targetId);
	if (buf.style.visibility == "")
	{
		buf.style.visibility = "hidden";
		buf.style.display = "none";		
	}
	else 
	{
		buf.style.visibility = "";
		buf.style.display = "";		
	}
}


function changecountry()
{
	var obj = document.getElementById("bs_from");
	var arr = obj.value; 	
	//var obj2 = document.getElementById("b_oneway");
	if (document.getElementById("b_oneway").checked)
	var arr2 = 1;	
	if (document.getElementById("b_roundtrip").checked)
	var arr2 = 11;
	//alert(arr2);
	
	
	//document.test_form.radio.checked
	var obj = document.getElementById("bs_to");
	    obj.options[0].text = "please wait..";
		obj.disabled=true;
		
	JsHttpRequest.query('/include/core/getregion.php',{ids:arr,tp:arr2}, 
  function(result, errors) {fillregion(result);}, true);
	return false;
}

function fillregion(result){
	if(!result) return false;
	var obj = document.getElementById("bs_to");
	obj.disabled=false;
			
	if (obj){
		 obj.options[0].text = "Arrival City";
		while(obj.options.length > 1) obj.options[1] = null;
		i = 1;
	  for (var key in result){
	    obj.options[i] = new Option();
	    obj.options[i].text = result[key]["text_name"];
	    obj.options[i].value = result[key]["id"];
	    i++;
	  }		
	}
}


