/*for login form*/
var timer = null;

function clear_input(e) {
  var i = e;
  i.value = '';
}

function allcities_over(e) {
  var l = e.firstChild;
  while (l.nodeName != 'DIV') {
    l = l.nextSibling;
  }
  l.style.display = 'block';
}
function allcities_out(e) {
  var l = e.firstChild;
  while (l.nodeName != 'DIV') {
    l = l.nextSibling;
  }
  l.style.display = 'none';
}

function hpfolders_click(e) {
  hpfolders_over(e);
}
function hpfolders_over(e) {
  var n = e.id;
  n = n.substring(n.length - 1);
  var l = e;
  while (l.nodeName != 'DIV' || l.className != 'hpfolders-menu') {
    l = l.parentNode;
  }
  l.style.backgroundPosition = 'left -' + (33 * n) + 'px';
  var b = l;
  while (b.nodeName != 'DIV' || b.className != 'hpfolders-boxes') {
    b = b.nextSibling;
  }
  var x = b.firstChild;
  while (x) {
    if (x.nodeName == 'DIV') {
      x.style.display = (x.id == 'hpfolders-box-' + n) ? 'block' : 'none';
    }
    x = x.nextSibling;
  }
}
function hpfolders_out(e) {
}



function popupfolders_click(e) {
  popupfolders_over(e);
}

function popupfolders_over(e) {
  var n = e.id;
  var m = e.parentNode.parentNode.childNodes;
  n = n.substring(n.length - 1);
  var l = e;
  var i = 0;


  while(i < m.length){
    if(m[i].nodeName == "LI"){
     	m[i].style.backgroundPosition = "0px 0px";
	/*	alert(i + "of "+ m.length + " = <" + m[i].nodeName + " class=" + m[i].className +" >") */
	}
	i++;
  }
  e.parentNode.style.backgroundPosition = "0 100%";


  while (l.nodeName != 'DIV' || l.className != 'popupfolders-menu') {
    l = l.parentNode;
  }

  var b = l;
  while (b.nodeName != 'DIV' || b.className != 'popupfolders-boxes') {
    b = b.nextSibling;
  }
  var x = b.firstChild;
  while (x) {
    if (x.nodeName == 'DIV') {
      x.style.display = (x.id == 'popupfolders-box-' + n) ? 'block' : 'none';
    }
    x = x.nextSibling;
  }
}
function popupfolders_out(e) {
}




function loginbox_over(e) {
  var c = e;
  while(c.nodeName != 'DIV' || c.className != 'credentials') {
    c = c.nextSibling;
  }
  c.style.display = 'block';
  var l = e;
  while(l.nodeName != 'A' || l.className != 'login') {
    l = l.previousSibling;
  }
  l.style.backgroundPosition = 'center bottom';
  window.clearTimeout(timer);
}
function hide() {
	var e = document.getElementById("credentials");
	e.style.display = 'none';
}
function loginbox_out(e) {
	timer = window.setTimeout('hide()',5000);
/*var c = e;
  while(c.nodeName != 'DIV' || c.className != 'credentials') {
    c = c.nextSibling;
  }
  c.style.display = 'none';
  var l = e;
  while(l.nodeName != 'A' || l.className != 'login') {
    l = l.previousSibling;
  }
  l.style.backgroundPosition = 'center top';*/
}

function loginbox_switch(e) {
var c = e;
  while(c.nodeName != 'DIV' || c.className != 'credentials') {
    c = c.nextSibling;
  }

  if(c.style.display != 'block') {
    c.style.display = 'block';
  }
  else {
     c.style.display = 'none';
  }
  var l = e;
  while(l.nodeName != 'A' || l.className != 'login') {
    l = l.previousSibling;
  }
  l.style.backgroundPosition = 'center bottom';
}


function mu2_menu_click(e) {
  mu2_menu_over(e);
}
function mu2_menu_over(e) {
  var n = e.id;
  n = n.substring(n.length - 1);
  var l = e;
  while (l.nodeName != 'DIV' || l.className != 'mu2-menu') {
    l = l.parentNode;
  }
  l.style.backgroundPosition = 'left -' + (50 * n) + 'px';
}
function mu2_menu_out(e) {
}

function mu2_news_click(e, d) {
  var m = e;
  while (m.nodeName != 'DIV' || m.className != 'mu2-news') {
    m = m.parentNode;
  }
  m.style.backgroundImage = d ? 'url("assets/design/img/myunite2-news1.gif")' : 'url("assets/design/img/myunite2-news2.gif")';
  var p = e;
  while (p.nodeName != 'UL' || p.className != 'tabs') {
    p = p.parentNode;
  }
  while (p.nodeName != 'UL' || p.className != 'project-content') {
    p = p.nextSibling;
  }
  p.style.display = d ? 'block' : 'none';
  var c = e;
  while (c.nodeName != 'UL' || c.className != 'tabs') {
    c = c.parentNode;
  }
  while (c.nodeName != 'UL' || c.className != 'company-content') {
    c = c.nextSibling;
  }
  c.style.display = d ? 'none' : 'block';
}

function property_click(e) {
  property_over(e);
}
function property_over(e) {
  var n = e.id;
  n = n.substring(n.length - 1);
  var l = e;
  while (l.nodeName != 'DIV' || l.className != 'property-menu') {
    l = l.parentNode;
  }
  l.style.backgroundPosition = 'left -' + (32 * n) + 'px';
  var b = l;
  while (b.nodeName != 'DIV' || b.className != 'property-boxes') {
    b = b.nextSibling;
  }
  var x = b.firstChild;
  while (x) {
    if (x.nodeName == 'DIV') {
      x.style.display = (x.id == 'property-box-' + n) ? 'block' : 'none';
    }
    x = x.nextSibling;
  }
}
function property_out(e) {
}

function question_over(e) {
  var c = e;
  while(c.nodeName != 'DIV' || c.className != 'question-box') {
    c = c.nextSibling;
  }
  c.style.display = 'block';
}
function question_out(e) {
  var c = e;
  while(c.nodeName != 'DIV' || c.className != 'question-box') {
    c = c.nextSibling;
  }
  c.style.display = 'none';
}

