﻿function ClearContactus(id)
{
        var text = document.getElementById(id).value;
        
        if(text == " Fullname:" || text== " Email:" || text== " Mobile:" || text== " Company:"
        || text== " Address:" || text== " Message:")
        {
        document.getElementById(id).value="";
        }
}

function ClearContactusFarsi(id)
{
        var text = document.getElementById(id).value;
        
        if(text == ":نام کامل تماس گیرنده " || text== ":پست الکترونيکى " || text== ":موبایل " || text== ":شرکت "
        || text== ":آدرس " || text== ":پیغام ")
        {
        document.getElementById(id).value="";
        }
}

function ClearYourProject(id2)
{
        var text = document.getElementById(id2).value;
        
        if(text == " username:" || text== " password:" ||  text==" securitycode:")
        {
        document.getElementById(id2).value="";
        }
}

function ClearYourProjectFarsi(id)
{
        var text = document.getElementById(id).value;
        
        if(text == ":نام کاربری " || text== ":کلمه رمز " || text==":کد امنیتی" )
        {
        document.getElementById(id).value="";
        }
}

function Hide(id,focus)
{
    if(id == "txtpass")
    {
    document.getElementById(id).style.display="none";
    document.getElementById(focus).style.display="block";
    document.all.ctl00_ContentPlaceHolder1_txtpassword.focus();
    }
    else if(id =="txtsecurity")
    {
    document.getElementById(id).style.display="none";
    document.getElementById(focus).style.display="block";
    document.all.ctl00_ContentPlaceHolder1_txtsecuritycode.focus();
    }
}

function Bulryourproject(id)
{
    var tid = document.getElementById(id).id;
    var vid= document.getElementById(id).value;
    if(tid == "ctl00_ContentPlaceHolder1_txtusername" && vid=="")
    {
    document.getElementById(tid).value = " username:";
    }
}

function Bulryourprojectfarsi(id)
{
    var tid = document.getElementById(id).id;
    var vid= document.getElementById(id).value;
    if(tid == "ctl00_ContentPlaceHolder1_txtusername" && vid=="")
    {
    document.getElementById(tid).value = ":نام کاربری ";
    }
}

function Bulrcontact(id)
{
    var tid = document.getElementById(id).id;
    var vid= document.getElementById(id).value;
    if(tid == "ctl00_ContentPlaceHolder1_txtfullname" && vid=="")
    {
    document.getElementById(tid).value = " Fullname:";
    }
    
    if(tid == "ctl00_ContentPlaceHolder1_txtmessage" && vid=="")
    {
    document.getElementById(tid).value = " Message:";
    }
    
     if(tid == "ctl00_ContentPlaceHolder1_txtemail" && vid=="")
    {
    document.getElementById(tid).value = " Email:";
    }
    
      if(tid == "ctl00_ContentPlaceHolder1_txtphone" && vid=="")
    {
    document.getElementById(tid).value = " Mobile:";
    }
    
      if(tid == "ctl00_ContentPlaceHolder1_txtcompany" && vid=="")
    {
    document.getElementById(tid).value = " Company:";
    }
    
      if(tid == "ctl00_ContentPlaceHolder1_txtaddress" && vid=="")
    {
    document.getElementById(tid).value = " Address:";
    }
}

function Bulrcontactfarsi(id)
{
    var tid = document.getElementById(id).id;
    var vid= document.getElementById(id).value;
    if(tid == "ctl00_ContentPlaceHolder1_txtfullname" && vid=="")
    {
    document.getElementById(tid).value = ":نام کامل تماس گیرنده ";
    }
    
    if(tid == "ctl00_ContentPlaceHolder1_txtmessage" && vid=="")
    {
    document.getElementById(tid).value = ":پیغام ";
    }
    
     if(tid == "ctl00_ContentPlaceHolder1_txtemail" && vid=="")
    {
    document.getElementById(tid).value = ":پست الکترونيکى ";
    }
    
      if(tid == "ctl00_ContentPlaceHolder1_txtmobile" && vid=="")
    {
    document.getElementById(tid).value = ":موبایل ";
    }
    
      if(tid == "ctl00_ContentPlaceHolder1_txtcompany" && vid=="")
    {
    document.getElementById(tid).value = ":شرکت ";
    }
    
      if(tid == "ctl00_ContentPlaceHolder1_txtaddress" && vid=="")
    {
    document.getElementById(tid).value = ":آدرس ";
    }
}

function BulrUrl(id)
{
    var tid = document.getElementById(id).id;
    var vid= document.getElementById(id).value;
    if(tid == "ctl00_ContentPlaceHolder1_txturl" && vid=="http://www.")
    {
    document.getElementById(tid).value = "";
    }
}

function FocusUrl(id)
{
    var tid = document.getElementById(id).id;
    var vid= document.getElementById(id).value;
    if(tid == "ctl00_ContentPlaceHolder1_txthyperlink" && vid=="")
    {
    document.getElementById(tid).value = "http://www.";
    }
}