if (document.location.href.indexOf("www.emrooz.com") != -1) {
	document.location.replace("www.tusbe.com/emrooz.asp");
}


B1On      = new Image;
B1On.src  = "./images/postit_button2.gif";
B1Off     = new Image;
B1Off.src = "./images/postit_button.gif";

B2On      = new Image;
B2On.src  = "./images/help_button2.gif";
B2Off     = new Image;
B2Off.src = "./images/help_button.gif";

B3On      = new Image;
B3On.src  = "./images/abouttusbe_button2.gif";
B3Off     = new Image;
B3Off.src = "./images/abouttusbe_button.gif";

B4On      = new Image;
B4On.src  = "./images/contactus_button2.gif";
B4Off     = new Image;
B4Off.src = "./images/contactus_button.gif";

B5On      = new Image;
B5On.src  = "./images/searchit_button2.gif";
B5Off     = new Image;
B5Off.src = "./images/searchit_button.gif";

function img_act(imgName) {
	imgOn = eval(imgName + "On.src");
        document [imgName].src = imgOn;
}
        
function img_inact(imgName) {
	imgOff = eval(imgName + "Off.src");
        document [imgName].src = imgOff;
}

function validateForm1()
            {
            formObj = document.Form1;
            if (formObj.Title.value == "") {
              alert("You have not filled in the Title field.");
              formObj.Title.focus();
              return false;
            }  
            else if (formObj.Title.value.indexOf("<") >=0) {
              alert("'<' character is not allowed in this field.");
              formObj.Title.focus();
              return false;
            }
            else if (formObj.Author.value == "") {
              alert("You have not filled in the Author field.");
              formObj.Author.focus();
              return false;
            } 
            else if (formObj.Author.value.indexOf("<") >=0) {
              alert("'<' character is not allowed in this field.");
              formObj.Author.focus();
              return false;
            } 
            else if (formObj.Name.value == "") {
              alert("You must provide your name.");
              formObj.Name.focus();
              return false;
            } 
            else if (formObj.Name.value.indexOf("<") >=0) {
              alert("'<' character is not allowed in this field.");
              formObj.Name.focus();
              return false;
            }
            else if (formObj.Email.value == "") {
              alert("You have not filled in the Email field.");
              formObj.Email.focus();
              return false;
            } 
            else if (formObj.Email.value.indexOf("<") >=0) {
              alert("'<' character is not allowed in this field.");
              formObj.Email.focus();
              return false;
            } 
            else if (formObj.Description.value.indexOf("<") >=0) {
              alert("'<' character is not allowed in this field.");
              formObj.Description.focus();
              return false;
            }
            else if (formObj.Password.value == "") {
              alert("You have not filled in the Password field.");
              formObj.Password.focus();
              return false;
            }  
            else if (formObj.Password.value.indexOf("<") >=0) {
              alert("'<' character is not allowed in this field.");
              formObj.Password.focus();
              return false;
            }
}

function openWindow(url, name, rs, w, h) {
          var resize = "";
          if (rs) {
            resize = "resizable,";
          }
          popupWin = window.open(url, name, 'toolbar=no,location=no,directories=no,menubar=no,scrollbars,, left=150, top=0, screenX=0, screenY=0,' + resize + 'width=' + w + ',height=' + h);
  
}

function openContactWindow(Id) {
	openWindow("Contact.asp?Id=" + Id, "Contact", "yes", 800, 550);

}

function CheckForm(ThisForm)
{
        if (ThisForm.name.value == "")
                {
                        alert("Your name is missing.");
                        ThisForm.realname.focus();
                        return false;
                }
        if (ThisForm.from.value == "")
                {
                        alert("Please provide your email address");
                        ThisForm.email.focus();
                        return false;
                }

        if (ThisForm.to.value == "")
                {
                        alert("There is no recipient");
                        ThisForm.recipient.focus();
                        return false;
                }
        return true;
}