/* Version=<<2.1.0.1094>> */
function openwin(url) {
	var winRef = window.open(url, '', 'width=700,height=600,toolbars=no,scrollbars=yes,resizable=yes');
}



function disabled() {
	alert("<?php echo DISABLED_FEATURE ?>");
	return false;
}


// Ensure Terms and Conditions are checked
function checkTerms(checkbx, msg) {

	if (!document.getElementById(checkbx).checked) {
		alert(msg);
		return false;
	}
}

// Select from pop-up on TMMS and RFL

function submitSelect(obj,targ) {
	if (obj.options.selectedIndex!=0) {
		location.href=targ + "?SN=" + obj.options[obj.options.selectedIndex].value;
	}
}



// Set software download

function setTMMSSoftware() {
	s=document.getElementById("manufacturer");
	if (s.options.selectedIndex!=0) {
		manufacturer=s.options[s.options.selectedIndex].value;
		software=manufacturer.substr(manufacturer.lastIndexOf(",")+1,manufacturer.length);
		
		switch(software) {
				case "A":
					program="http://www.trendmicro.com/ftp/products/tmms/tmms3.0_WM5.0_PocketPC_1164.zip";
					break;
				case "B":
					program="http://www.trendmicro.com/ftp/products/tmms/tmms3.0_WM5.0_Smartphone_1164.zip";
					break;
				case "C":
					program="http://www.trendmicro.com/ftp/products/tmms/tmms3.0_Sym9.1_S60_1120.zip";
					break;
			}
		
		location.href=program;
		
		
		
		
	} else {
		alert("You did not choose any software to download");
	}
}


function TMMSDownload(software, msg) {
		
		if (software == "") { // no longer supported
			if (msg === undefined) msg = "No download available. Trend Micro Mobile Security no longer supports this phone. Please see the list of supported phones.";
			alert(msg);
		} else {
			switch(software) {
				case "A":
					program="http://www.trendmicro.com/ftp/products/tmms/tmms3.0_WM5.0_PocketPC_1164.zip";
					break;
				case "B":
					program="http://www.trendmicro.com/ftp/products/tmms/tmms3.0_WM5.0_Smartphone_1164.zip";
					break;
				case "C":
					program="http://www.trendmicro.com/ftp/products/tmms/tmms3.0_Sym9.1_S60_1120.zip";
					break;
				default:
					alert("No download available. Please see the list of supported phones.");
					break;
			}
			
			location.href=program;
		}		
		
}