function langimage(txt) {
	document.getElementById('splash-language').src = "images/text-" + txt + ".jpg";
}

function aboutload(live) {
	document.getElementById('about-box').style.display = "none";
	document.getElementById('about-london').style.display = "none";
	document.getElementById('about-china').style.display = "none";
	document.getElementById('about-russia').style.display = "none";
	document.getElementById('about-usa').style.display = "none";
	document.getElementById('about-columbia').style.display = "none";
	document.getElementById('about-southafrica').style.display = "none";
	document.getElementById('about-indonesia').style.display = "none";
	document.getElementById('about-india').style.display = "none";
	document.getElementById('about-iran').style.display = "none";
	document.getElementById('about-' + live).style.display = "block";
}

function chkF(field,alerttxt,reject){
	with (field) {
		if (value==null||value==""||value==reject){
			alert(alerttxt);
			return false
		} else { return true }
	}
}

function chkE(field,alerttxt){
	with (field){
		apos=value.indexOf("@")
		dotpos=value.lastIndexOf(".")
		if (apos<1||dotpos-apos<2) 
			  {alert(alerttxt);return false}
		else {return true}
	}
}

function contactForm(thisForm) {
	with (thisForm){
		if (chkF(lhlName, "Please enter your name.", "asd")==false){
			lhlName.focus();
			return false
		}
		
		if (chkE(lhlEmail,"Sorry that isn't a valid Email Address")==false){
			lhlEmail.focus();
			return false
		}
		
		if (chkF(lhlContact,"Please enter your Contact Number", "asd")==false){
			lhlContact.focus();
			return false
		}
		
		if (chkF(lhlMessage, "Please enter a Message", "asd")==false){
			lhlMessage.focus();
			return false
		}
	}
}

function changeimg(img) {
	if(img.src.match("-norm")) {
		img.src = img.src.split("-norm").join("-fade");
	} else {
		img.src = img.src.split("-fade").join("-norm");
	}
}

function changeprodimg(img) {
	if(img.src.match("-norm")) {
		img.src = img.src.split("-norm").join("-fade");
	} else {
		img.src = img.src.split("-fade").join("-norm");
	}
}

function flash(movie, width, height, alt, id) {
	document.write('<object style="border:0;padding:0;margin:0;" id="'+id+'" type="application/x-shockwave-flash" data="'+movie+'" width="'+width+'" height="'+height+'" title="'+alt+'">\n');
	document.write('<param name="movie" value="'+movie+'" />\n');
	document.write('<param name="wmode" value="transparent" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('</object>\n');
}

function newwin(lnk) {
	window.open(lnk.href, 'newwindow','toolbar=yes, location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes, resizable=yes');
	return false;
}

function areyousure(txt) {
	var q = confirm(txt);
	if (!q){ return false; }
}

