function SelectCountry() {
	var x=document.getElementById("country")
	var y = x.selectedIndex;
	var z = x.options[y].value;
	document.getElementById('d_country_code').value = z;
	document.getElementById('country_code').value = z;
	}

function fixNumbers(value_input,size) {
	value_input.value=value_input.value.replace(/[^0-9]+/g,"").substring(0,size);
	}
					
function topage_sms() {
	
	ppc = new Array("Windows Mobile 6 Classic and Professional", "Windows Mobile Pocket PC 5.0");
	smartphone = new Array("Windows Mobile 6 Standard", "Windows Mobile Smartphone 5.0", "Windows Mobile Smartphone 2003/2003SE");
	platforms = new Array("ppc", "smartphone");
	
	var s = document.frmSms.os_sms.options.item(document.frmSms.os_sms.options.selectedIndex).text
	var platf="";
	for (i = 0; i < platforms.length; i++) {
		for (j = 0; j < eval(platforms[i]).length; j++) {
			if (s == eval(platforms[i])[j]) {
				platf = platforms[i];
				j = eval(platforms[i]).length - 1;
				i = platforms.length - 1;
			}
		}
	}
	
	s = "http://www.penreader.com/download/" + platf + "/converter/HandyConverter(Penreader).arm.CAB";
	document.getElementById('link').value = s;
}
