﻿
function MM_openBrWindow(theURL,winName,features) { //v2.0
  newwindow=window.open(theURL,winName,features);
  if (window.focus) {newwindow.focus()}
}

//Function to check form is filled in correctly before submitting
function CheckForm () {

	var errorMsg = "";

	//Check for a Username
	if (document.frmLogin.name.value==""){
		errorMsg += "\n\tUsername \t- Enter your Forum Username";
	}

	//Check for a Password
	if (document.frmLogin.password.value==""){
		errorMsg += "\n\tPassword \t- Enter your Forum Password";
	}

	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "_______________________________________________________________\n\n";
		msg += "The form has not been submitted because there are problem(s) with the form.\n";
		msg += "Please correct the problem(s) and re-submit the form.\n";
		msg += "_______________________________________________________________\n\n";
		msg += "The following field(s) need to be corrected: -\n";

		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}

	return true;
}

function OpenPositionedWindow(oButton, url, windowName)
{
    var oWnd = window.radopen(url,windowName);
}

function openRadWindow(id)
{
    var oWnd = radopen("ProductImage.aspx?id=" +id, "RadWindow1" );
    oWnd.setSize(300,400);
    oWnd.center();
}

function openRadProduct(url, w, h)
{
    var oWnd = radopen(url, "RadWindow1" );
    oWnd.setSize(w,h);
    oWnd.center();
}
