﻿// JScript File
function CallBackCompleteMail(ret)
{
    //alert("CallBackCompleteMail \n"+ret)
    var obj=document.getElementById("newsletter");
    if(typeof(obj)=="object")
    {
        if(ret=="True")
        {
            obj.className="inputMailTrue";
            obj.value="Thank you for subscribing";
            
        }
        else
        {
            obj.className="inputMailFalse";
            obj.value="Sorry, please try again later";
        }
    }
}
function CallBackError(error)
{		alert("Server Error: " + error);	}

function IsEMail(str)
{
	var pattern = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/
	return pattern.test(str);
}
////////////
function chCss(code,newClassName)
{
    var obj=document.getElementById(code);
    if(obj)
        obj.className=newClassName
}
function iefix()
{
    theObjects = document.getElementsByTagName("object");
    for (var i = 0; i < theObjects.length; i++) {theObjects[i].outerHTML = theObjects[i].outerHTML;}
    theObjects = document.getElementsByTagName("embed");
    for (var i = 0; i < theObjects.length; i++) {theObjects[i].outerHTML = theObjects[i].outerHTML;}
}

if (document.addEventListener)
    document.addEventListener ("load",iefix,false);
else if (window.attachEvent)
    window.attachEvent("onload",iefix);
else
    document.onload = iefix;
    
