//This will used to focus to cursor into text field. Called form login pages.
function focusTextField()
{
    for(var i=0; i<document.form1.elements.length; i++)
    {   // Focus on the 1st text OR password entry field
        if( document.form1.elements[i].type == "text" || document.form1.elements[i].type == "password" )
        {
            document.form1.elements[i].focus();
            break;
        }
    }
}

function openResolutionWarningWindow(target)
{
    setWindowProperties('width=475,height=530,resizable,scrollbars');
    openWindow(target);
}

//Calling from posters flow to display a help popup.
function openPhotoCardsWindow(target)
{
    setWindowProperties('width=505,height=505,resizable,scrollbars=yes');
    openWindow(target);
}


function openDynamicHelpWindow(target,witdth,height)
{
    setWindowProperties('width='+witdth+' ,height='+height+',resizable,scrollbars=yes');
    openWindow(target);
}
function openForgotPasswordWindow(target)
{
    setWindowProperties('width=430,height=235,resizable');
    openWindow(target);
}

function openTermsnConditionsWindow(target)
{
    setWindowProperties('width=480,height=480,resizable,scrollbars=yes');
    openWindow(target);
}

function openITTermsWindow(target)
{
    setWindowProperties('width=480,height=365,resizable,scrollbars=yes');
    openWindow(target);
}

function openPrivacyWindow(target)
{
    setWindowProperties('width=480,height=480,resizable,scrollbars=yes');
    openWindow(target);
}

function openPricingWindow(target)
{
    setWindowProperties('width=480,height=480,resizable,scrollbars=yes');
    openWindow(target);
}

function openHelpWindow(target)
{
    setWindowProperties('width=490,height=480,resizable,scrollbars=yes');
    openWindow(target);
}

function openSafeSecureWindow(target)
{
    setWindowProperties('width=470,height=480,resizable,scrollbars=yes');
    openWindow(target);
}

function openSavePasswordWindow(target)
{
    setWindowProperties('width=430,height=280,resizable,scrollbars=auto');
    openWindow(target);
}

//Calling form upload_main_activia_content.jsp
function openFileModeHelpWindow(target)
{
    setWindowProperties('titlebar=0,toolbar=0,status=0,scrollbars=1,height=450,width=550,resizable');
    openWindow(target);
}

//Called from store pages.
function getFormObj(name)
{
    var formObj = eval(document.forms[name]);
    if((typeof formObj) == "object")
    {
        return formObj;
    }else{
        alert("The form " + name +" does not exists in this document");
        return ;
    }
}


