function selectcountry() {
	if (document.getElementById('countrylist').options[document.getElementById('countrylist').selectedIndex].value == "") return;
	if (document.getElementById('countrylist').options[document.getElementById('countrylist').selectedIndex].value == "za") {
		window.location = 'http://www.iburst.co.za/';
	} else {
		window.location = 'index.php?c=' + document.getElementById('countrylist').options[document.getElementById('countrylist').selectedIndex].value;
	}
}
function menuclicked(menuclicked,dcontent) {
	var count=0;
	while (count <= 20) {
		if (document.getElementById("pmenu" + count) == null) return;
		if (count == menuclicked) {
			document.getElementById("pmenu" + count).style.background = "url(images/none/English/navigation_over.jpg)";
			document.getElementById("pmenu" + count).style.backgroundRepeat = "no-repeat";
			draw_submenus(menuclicked,dcontent);
		} else {
			document.getElementById("pmenu" + count).style.background = '';
		}
		count = count + 1;
	}
	return;
}
function draw_submenus(menu,dcontent) {
	tmp = "<ul>";
	tmp += "</ul>";
	document.getElementById('sub-navigation').innerHTML = tmp;
}

function showobject(obj) {if (document.all) {document.getElementById(obj).style.display = 'inline';} else {document.getElementById(obj).style.display = '';}}
function hideobject(obj) {if (document.all) {document.getElementById(obj).style.display = 'none';} else {document.getElementById(obj).style.display ='none';}}
function delete_notification_row(id) {hideobject('yournotifications');showobject('loading');document.getElementById('deleteid').value = id;document.getElementById('deleteform').submit();}
function checkMail(email){var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;if (filter.test(email)) {return true;}alert('The email address supplied is not valid');return false;}
var AccBalLoading = 0;
function AccountMoreInfo(trans,month) {if (AccBalLoading == 1) {alert('Please wait while the previous operation is completed');} else {if (document.getElementById('detail_' + trans).innerHTML != "") {document.getElementById('detail_' + trans).innerHTML = "";} else {document.getElementById('detail_' + trans).innerHTML = "&nbsp;<img width='12' height='12' border=0 src='../images/none/English/loading.gif'>&nbsp;loading...";AccBalLoading = 1;document.getElementById('RSSFrame').src = '?c=none&lang=English&content=accountbalance&getdata=' + trans + '&t=' + month + '&nomenu=1';}}}
function loadVoucherChk() {
	showobject('loadingimagedisp');
	document.getElementById('loadingtxt').innerHTML = '&nbsp;Processing Request...';
	if (document.getElementById('pin').value.length <= 5 || document.getElementById('ser0').value.length != 4 || document.getElementById('ser1').value.length != 4 || document.getElementById('ser2').value.length != 4) {
		alert('Please fill out all the fields.');
		if (document.getElementById('pin').value.length <= 5) {
			document.getElementById('pin').style.background = '#f56600';
		} else {
			document.getElementById('pin').style.background = '';
		}
		if (document.getElementById('ser0').value.length != 4) {
			document.getElementById('ser0').style.background = '#f56600';
		} else {
			document.getElementById('ser0').style.background = '';
		}
		if (document.getElementById('ser1').value.length != 4) {
			document.getElementById('ser1').style.background = '#f56600';
		} else {
			document.getElementById('ser1').style.background = '';
		}
		if (document.getElementById('ser2').value.length != 4) {
			document.getElementById('ser2').style.background = '#f56600';
		} else {
			document.getElementById('ser2').style.background = '';
		}
		return false;
	} else {
		hideobject('topupaccount');
		showobject('loading');
	}
}

