function lo() {

		 

        var oWait = null, oBody = null, elemWait, elemBody;		 

        if (document.getElementById) { // IE 5+/NS6

	              elemWait = document.getElementById('loading');				  

				 //

              if (elemWait != null) {

                        oWait = elemWait.style;						 

                }

                elemBody = document.getElementById('logo');

                if (elemBody != null) {

                        oBody = elemBody.style;

                }

        } else if (document.layers) {

                oWait = document.layers['loading'];

                oBody = document.layers['logo'];

        } else if (document.all) {

                elemWait = document.all['loading'];

                if (elemWait != null) {

                oWait = elemWait.style;

                }

                elemBody = document.all['logo'];

                if (elemBody != null) {

                oBody = elemBody.style;

                }

        }

        if ((oWait != null) && (oBody != null)) {

                if (oWait && oBody) {

                        oWait.visibility = 'hidden';

                        oBody.visibility = 'visible';

						logo.style.top=0;

                }

        }	

	

	//document.loading.visibility = 'hidden';

			

}  



function show1(url,x,y) 

	{ window.open(url,"", 'toolbar=no, location=no, resizable=no, status=no, scrollbars=yes, resizable=1, menubar=no, width='+x+', height='+y);}

function show(url,x,y) 

	{ window.open(url,"", 'toolbar=no, location=no, resizable=no, status=no, scrollbars=no, menubar=no, width='+x+', height='+y);}



function check_required(obj)

	{  			

		if(obj)

		{

			//alert('form');

			var t = 0;

			for(i=0;i<obj.elements.length;i++)

			{

				if(obj.elements[i].id=='required')

				{

					switch(obj.elements[i].type)

					{

						default: if(!obj.elements[i].value) t++; break;

					}

				}

			}

			if(t) alert('Fill in all of the required fields, please');

			else obj.submit();

		}

	

	}  

	

function check_reqvisa(obj,f,n)

	{

		if(obj.form)

		{

			var t = 0;

			for(i=0;i<obj.elements.length;i++)

			{

				if(obj.elements[i].id=='required')

				{

					switch(obj.elements[i].type)

					{

						default: if(!obj.elements[i].value) t++; break;

					}

				}

			}

			if(t) alert('Fill in all of the required fields, please');

			

			var em = 0;	 			

			

			if((!t)&&(!em)&&(f==1)&&(n==1)) obj.submit();			

		}

	}	

			

function showObject(obj) { obj.style.visibility="visible"; 

						Sl=document.body.clientWidth;

						St=document.body.clientHeight; 

	if((Sl-(event.clientX + document.body.scrollLeft))<=320)

		{obj.style.left = event.clientX + document.body.scrollLeft-300}

	else {obj.style.left = event.clientX + document.body.scrollLeft}

						obj.style.top = event.clientY + document.body.scrollTop+20;}





function hideObject(obj) { obj.style.visibility="hidden"; }			



function test(obj)

	{  		

		//alert('test');

		alert(obj.elements.length);

	

	}  	



function check_required_sub(obj)

	{  		

		if(obj)

		{

			var t = 0;

			for(i=0;i<obj.elements.length;i++)

			{

				if(obj.elements[i].id=='required')

				{

					switch(obj.elements[i].type)

					{

						default: if(!obj.elements[i].value) t++; break;

					}

				}

			}

			if(t) alert('Fill in all of the required fields, please');

			else obj.submit();

		}

	

	}  

function analiz(a,b)

	{

		a=a.replace(/ /g, '');

		b=b.replace(/ /g, '');  

					

		a=a.toLowerCase();		

		b=b.toLowerCase();

		

		if(a==b) return 1; else alert('CREDIT CARD HOLDER NAME AND NAME OF LEAD PASSENGER DO NOT MATCH, TO PROCESS ORDER THEY MUST BE THE SAME');		

	}	



function analiz_nation(a)

	{

		a=a.replace(/ /g, '');						

		a=a.toLowerCase();	

		suba=a.slice(0,3);

		switch(suba)

		{		

		case 'afg':

		case 'alg':

		case 'ban':

		case 'bos':

		//case 'cha':

		case 'egy':

		case 'eth':

		case 'ind':

		case 'ira':

		case 'jor':

		case 'leb':

		case 'nig':

		case 'pak':

		case 'pal':

		case 'rwa':

		case 'sau':

		case 'som':

		case 'sri':

		case 'sud':

		case 'syr':

		case 'tur':

		case 'vie':

		case 'chi':

		case 'peo':

		case 'gha':

		case 'sie':

		case 'ang':

		case 'prc':

		case 'mal':

		case 'phi':

		case 'mor':

		case 'tha':

		case 'gam':

		case 'ken':

		case 'con':

		case 'gua':

			alert('Unfortunately, we are currently in the process of renewing our license and can no longer issue visas. \nSorry for this inconvenience please try another agency');

			nation=0;

			//for(i=0;i<obj.form.elements.length;i++)

			//{obj.form.elements[i].value='';}

		break;

		

		default: nation=1; break;

		}	

		return 	nation;

	}	

function checkOut(name) {
		if(name=='check-in' || name=='check-out') {
				
			inDate=document.getElementById('check-in');
			outDate=document.getElementById('check-out');
			}
		else if(name=='checkin' || name=='checkout') {
			inDate=document.getElementById('checkin');
			outDate=document.getElementById('checkout'); }
		else if(name=='check-in2' || name=='check-out2') {
			inDate=document.getElementById('check-in2');
			outDate=document.getElementById('check-out2'); }	
		
		if(inDate.value || outDate.value){
			
			var inArr=inDate.value.split('.');
			var outArr=outDate.value.split('.');
			if(inArr[2]+ inArr[1]+ inArr[0] >= outArr[2]+ outArr[1]+ outArr[0] || inArr.length!=3 || outArr.length!=3) {
				
				if(name=='check-in' || name=='checkin' || name=='check-in2') {
					var newdate = new Date(inArr[2], inArr[1]-1, inArr[0]*1+1);
					dateforinp=addZero(newdate.getDate())+ "." + addZero(newdate.getMonth()*1+1) + "." + newdate.getFullYear();
					outDate.value=dateforinp;
					 }
				else  {
					var newdate = new Date(outArr[2], outArr[1]-1, outArr[0]-1);
					dateforinp=addZero(newdate.getDate())+ "." + addZero(newdate.getMonth()*1+1) + "." + newdate.getFullYear();
					inDate.value=dateforinp; 
					}
			}
		
		}
	}
function addZero(str) {
	if (str<10)
		str="0"+str; 
	return (str);
	}	