document.onclick = function(e)
{
  var target = e ? e.target : window.event.srcElement;

  while (target && !/^(a|body)$/i.test(target.nodeName))
  {
    target = target.parentNode;
  }

  if (target && target.getAttribute('rel')
      && target.rel == 'external')
  {
    var external = window.open(target.href);

    return external.closed;
  }
}

function clearInput(el, default_val) {
	if (el.value == default_val)
		el.value = "";
}

function fillInput(el, default_val) {
	if (el.value == "")
		el.value = default_val;
}


function makePassword(el) {
	if(navigator.appName.match("Explorer"))
	{
		$passDiv = document.getElementById("passContain");
		$passDiv.innerHTML = '<input type="password" id="login_password" name="login_password" class="formTxt" value="password" maxlength="255" onfocus="clearPassword(this);" />';
		window.setTimeout("document.getElementById('login_password').focus()",1);
	}
	else
	{
		el.type = "password";
	}
}

/*
if (document.all && document.styleSheets && document.styleSheets[0] &&
document.styleSheets[0].addRule)
{
// Feel free to add rules for specific tags only, you just have to call it several times.
document.styleSheets[0].addRule('*', 'behavior: url(iepngfixa.htc)');
}
*/