﻿var newwindow;
function popOpen(url) {
    newwindow = window.open(url, 'name', 'height=600,width=750, left=100, top=100, location=no, scrollbars=yes');
    if (window.focus) { newwindow.focus() }
}

function popOpenSmall(url) {
    newwindow = window.open(url, 'name', 'height=350,width=600, left=100, top=100, location=no, scrollbars=yes');
    if (window.focus) { newwindow.focus() }
}

function validate(form) {
    if (!document.frmMain.agree.checked) {
        alert("Please verify that you have read and understand the terms and conditions");
        return false;
    }
    return true;
}

function newImage(arg) {
    if (document.images) {
        rslt = new Image();
        rslt.src = arg;
        return rslt;
    }
}

function changeFrmImages() {
   document.getElementById(changeFrmImages.arguments[0]).src = changeFrmImages.arguments[1];
}

function changeImages() {
    if (document.images && (preloadFlag == true)) {
        for (var i = 0; i < changeImages.arguments.length; i += 2) {
            document[changeImages.arguments[i]].src = changeImages.arguments[i + 1];
        }
    }
}

function showLoginPanel() {
    document.getElementById('loginpanel').style.visibility = 'visible';
	document.getElementById('loginbutton').style.visibility = 'hidden';
	document.getElementById('txtUserName').focus();
	}

function showForgotPasswordPanel() {
    document.getElementById('forgotpassword').style.visibility = 'visible';
    document.getElementById('loginpanel').style.visibility = 'hidden';
	document.getElementById('loginbutton').style.visibility = 'hidden';
	document.getElementById('txtEmailAddress').value = document.getElementById('txtUserName').value;
	document.getElementById('txtEmailAddress').focus();	
	}

function showCCPanel() {
    document.getElementById('ccpanel').style.display = 'block';
    //document.getElementById('ccpanel').style.visibility = 'visible';
    document.getElementById('cboCardType').focus();
}

function showEmailPanel() {
    document.getElementById('emailpanel').style.display = 'block';
    document.getElementById('txtYourName').focus();
}

