//startFlash
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
//clip name should match the 'IDhere'_DoFSCommand
function ipBtn_DoFSCommand(command, args) {
	if (command == "ipLink") {
		window.open(args);
	}
}
// Hook for Internet Explorer for intLinkClip 
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
	  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub ipBtn_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call ipBtn_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}
//
//endofFlash
//
//
//startFlash
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
//clip name should match the 'IDhere'_DoFSCommand
function SubBtn_DoFSCommand(command, args) {
	if (command == "sub") {
		if(ValPropEnq()) {
			document.PropEnq.submit();
		}
	}
}
// Hook for Internet Explorer for intLinkClip 
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
	  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub SubBtn_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call SubBtn_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}
//
//endofFlash
//
//startFlash
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
//clip name should match the 'IDhere'_DoFSCommand
function PrintBtn_DoFSCommand(command, args) {
	if (command == "doPrint") {
		//window.open('http://www.iperium.info/pdf_prcom.asp?RefNum='+args);
		//window.open('print.asp?RefNum='+args);
		leftPos = 0
		topPos = 0
		if (screen){
			leftPos = (screen.width / 2) - 360
			topPos = (screen.height / 2) - 300
		}
		PrintWin=window.open('print.asp?RefNum='+args,'PrintWin','height=600, width=720, top='+topPos+', left='+leftPos+', status=0, resizable=1');
		if (window.focus) {
			PrintWin.focus();
		}
	}
}
// Hook for Internet Explorer for intLinkClip 
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
	  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub PrintBtn_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call PrintBtn_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}
//
//endofFlash
//
//
function isEmail(eml){
	var i = 1;
	var emlLength = eml.length;
	
	while ((i < emlLength) && (eml.charAt(i) != "@")){
		i++;
	}
	
	if ((i >= emlLength) || (eml.charAt(i) != "@")) {
		return false;
	} else {
		i += 2;
	}
	
	while ((i < emlLength) && (eml.charAt(i) != ".")){
		i++;
	}
	
	if ((i >= emlLength - 1) || (eml.charAt(i) != ".")){
		return false;
	} else {
		return true;
	}
}
//
function ValPropEnq(){
	var isAnError = false;
	var errMsg = "There are problems with your form entries.\n\n";
	//
	if(document.PropEnq.FullName.value == "")  {
		errMsg += "• Please enter your full name.\n";
		isAnError = true;
	}
	//
	if(document.PropEnq.Email.value == "")  {
		errMsg += "• Please enter an email address.\n";
		isAnError = true;
	}
	//
	if(document.PropEnq.Email.value != "")  {
		if (!isEmail(document.PropEnq.Email.value)){
			errMsg += "• Please enter a valid email address\n";
			isAnError = true;
		}
		
	}
	//
	if(isAnError){
		alert(errMsg);
		return false;
	}
	//
	if(!isAnError){
		return true;
	}
}
//