// JavaScript Document

function ClearText(ctl, defaultText)
{
    if(ctl.value == defaultText)
    {           
        ctl.value = "";
    }
 
}

function ResetText(ctl, defaultText)
{
    if(ctl.value.length == 0)
    {           
        ctl.value = defaultText;
    }  
}

function changeInputType(oldObject, oType)
{ 
    if(oldObject.value.length == 0)
    { 
        var newObject = document.createElement('input');
        newObject.type = oType;
        if(oldObject.size) newObject.size = oldObject.size;
        if(oldObject.value) newObject.value = oldObject.value;
        if(oldObject.name) newObject.name = oldObject.name;
        if(oldObject.id) newObject.id = oldObject.id;
        if(oldObject.className) newObject.className = oldObject.className;
        if(oldObject.style.width) newObject.style.width = oldObject.style.width;
        if(oldObject.style.fontSize) newObject.style.fontSize = oldObject.style.fontSize;
        oldObject.parentNode.replaceChild(newObject,oldObject);
    }
    return newObject;
}
//function password()
//{
// 
//           if(document.getElementById("Pass").value == "Password")
//           {           
//                       document.getElementById("Pass").value = "";
//           }
// 
//}
