// function for logging into the products
function setForm(){

	// set object handlers
	var oform = document.loginform;
	var oproductselectbox = oform.productlogin;
	var iproduct = oproductselectbox.options[oproductselectbox.selectedIndex].value;
	var strpostlocation = "";

	switch(iproduct){
	case '1': // AdDynamix
		strpostlocation = "http://www.addynamix.co.uk/AdDynamix/referral/remotelogin.aspx";
		oform.txtUserName.value = oform.username.value; 
		oform.txtPassword.value = oform.password.value;
		oform.txtSystem.value="ADX";
		break;

	case '2.1': // Market Movements 
		strpostlocation = "../Market.php";
		oform.txtSystem.value = "http://www.marketmovements.com/MarketMovements/DirectMail_New/DMindex.asp?BA=DM&SUBMIT1=LOGIN";
		break;

	case '2.2': // Market Movements
		strpostlocation = "../Market.php";
		oform.txtSystem.value = "http://www.marketmovements.com/MarketMovements/AllPress/PressIndex.asp?BA=Press&SUBMIT1=LOGIN";
		break;

	case '2.3': // Market Movements
		strpostlocation = "../Market.php";
		oform.txtSystem.value = "http://www.marketmovements.com/MarketMovements/News/NewsIndex.asp?BA=News&SUBMIT1=LOGIN";
		break;

	case '2.4': // Market Movements
		strpostlocation = "../Market.php";
		oform.txtSystem.value = "http://www.marketmovements.com/MarketMovements/LooseInserts_New/LPIindex.asp?BA=LPI_New&SUBMIT1=LOGIN";
		break;

	case '2.5': // Market Movements
		strpostlocation = "../Market.php";
		oform.txtSystem.value = "http://www.marketmovements.com/MarketMovements/LooseInserts/LPIindex.asp?BA=LPI&SUBMIT1=LOGIN";
		break;

	case '2.6': // Market Movements
		strpostlocation = "../Market.php";
		oform.txtSystem.value = "http://www.marketmovements.com/MarketMovements/BTBDMail/BTBindex.asp?BA=BTB&SUBMIT1=LOGIN";
		break;

	case '3': // MediaPix
//		strpostlocation = "http://www.mediamonitoring.com/common/login/validate.asp?browser=explorer";
		strpostlocation = "../Mediapix.php";
		break;

	case '4': // TV Pix
		//strpostlocation = "http://193.114.236.34/login/Login_check.asp";
		strpostlocation = "http://tvpix.nielsenmedia.co.uk/login/Login_check.asp";
		break;

	case '5': // Creative Dynamix
		strpostlocation = "http://www.creativedynamix.co.uk/CreativeDynamix/referral/remotelogin.aspx";
		oform.txtUserName.value = oform.username.value; 
		oform.txtPassword.value = oform.password.value;
		oform.txtSystem.value="CDX";
		break;

	case '6': //TV Pix Sponsorship
		//strpostlocation = "http://193.114.236.33/login/Login_check.asp";
		strpostlocation = "http://tvs.nielsenmedia.co.uk/login/Login_check.asp";
		break;

	}

	oform.action = strpostlocation;
	oform.method="POST";
	oform.submit();

}

// for locating to your business section
function locateto(){	
	var oform = document.businessform;
	var obusinessSelect = oform.yourbusiness;

	var strlocateto = obusinessSelect.options[obusinessSelect.selectedIndex].value;

	document.location.href = 'business.php?business='+strlocateto;

}