function setPng24(obj) {
var Src, Width, Height;

Src = obj.src;
Width = obj.width;
Height = obj.height;

    obj.width=Width;
    obj.height=Height;
    obj.className=obj.className.replace(/\bpng24\b/i,'');
    obj.style.filter =
    "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
    obj.src='images/blank.gif'; 
    return '';
} 


function link01() {
	location.href="index.php";
}
function link02() {
	location.href="index.php?page=aboutus";
}
function link03() {
	location.href="index.php?page=strategy";
}
function link04() {
	location.href="index.php?page=advisoryservices";
}
function link05() {
	location.href="index.php?page=investorrelations";
}
function link06() {
	location.href="index.php?page=contactus";
}

function sublink01() {
	location.href="index.php?page=aboutus";
}
function sublink02() {
	location.href="index.php?page=advisors";
}
function sublink03() {
	location.href="index.php?page=partners";
}

function sublink04() {
	location.href="index.php?page=ritz";
}
function sublink05() {
	location.href="index.php?page=elm";
}
function sublink06() {
	location.href="index.php?page=redfrog";
}
function sublink07() {
	location.href="index.php?page=rumcay";
}
function sublink08() {
	location.href="index.php?page=noho";
}
function sublink09() {
	location.href="index.php?page=lumos";
}


// Copyright (C) 2005-2008 Ilya S. Lyubinskiy. All rights reserved.
// Technical support: http://www.php-development.ru/
//
// YOU MAY NOT
// (1) Remove or modify this copyright notice.
// (2) Re-distribute this code or any part of it.
//     Instead, you may link to the homepage of this code:
//     http://www.php-development.ru/javascripts/dropdown.php
//
// YOU MAY
// (1) Use this code on your website.
// (2) Use this code as part of another product.
//
// NO WARRANTY
// This code is provided "as is" without warranty of any kind.
// You expressly acknowledge and agree that use of this code is at your own risk.


// ***** Popup Control *********************************************************

// ***** at_block_aux *****

function at_block_aux(parent, child)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child );

  var top  = (c["at_position"] == "y") ? p.offsetHeight-2 : 0;
  var left = (c["at_position"] == "x") ? p.offsetWidth +2 : 0;

  for (; p; p = p.offsetParent)
  {
    top  += p.offsetTop;
    left += p.offsetLeft;
  }

  c.style.position   = "absolute";
  c.style.top        = top +'px';
  c.style.left       = left+'px';
  c.style.display = "block";
}

// ***** at_block *****

function at_block()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  at_block_aux(p.id, c.id);
  clearTimeout(c["at_timeout"]);
}

// ***** at_hide *****

function at_hide()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  c["at_timeout"] = setTimeout("document.getElementById('"+c.id+"').style.display = 'none'", 1);
}

// ***** at_click *****

function at_click()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  if (c.style.display != "block") at_block_aux(p.id, c.id); else c.style.display = "none";
  return false;
}

// ***** at_attach *****

// PARAMETERS:
// parent   - id of the parent html element
// child    - id of the child  html element that should be droped down
// blocktype - "click" = drop down child html element on mouse click
//            "hover" = drop down child html element on mouse over
// position - "x" = display the child html element to the right
//            "y" = display the child html element below
// cursor   - omit to use default cursor or specify CSS cursor name

function at_attach(parent, child, blocktype, position, cursor)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child);

  p["at_parent"]     = p.id;
  c["at_parent"]     = p.id;
  p["at_child"]      = c.id;
  c["at_child"]      = c.id;
  p["at_position"]   = position;
  c["at_position"]   = position;

  c.style.position   = "absolute";
  c.style.display = "none";

  if (cursor != undefined) p.style.cursor = cursor;

  switch (blocktype)
  {
    case "click":
      p.onclick     = at_click;
      p.onmouseout  = at_hide;
      c.onmouseover = at_block;
      c.onmouseout  = at_hide;
      break;
    case "hover":
      p.onmouseover = at_block;
      p.onmouseout  = at_hide;
      c.onmouseover = at_block;
      c.onmouseout  = at_hide;
      break;
  }
}


var	clean=1;
var	objName;
var	pageName;

function Img(objName)
{
    imgSrc = eval(objName + "_off.src");
	document[objName].src = imgSrc;
}

function onImg(objName)
{
    imgSrc = eval(objName + "_ovr.src");
    document[objName].src = imgSrc;
}

function actImg(objName)
{
    imgSrc = eval(objName + "_act.src");
    document[objName].src = imgSrc;
}

if (document.images)
{
	test_ovr = new Image();
	test_ovr.src = "images/menu_01on.gif";
	test_off = new Image();
	test_off.src = "images/menu_01.gif";
	test2_ovr = new Image();
	test2_ovr.src = "images/menu_02on.gif";
	test2_off = new Image();
	test2_off.src = "images/menu_02.gif";
	test3_ovr = new Image();
	test3_ovr.src = "images/menu_03on.gif";
	test3_off = new Image();
	test3_off.src = "images/menu_03.gif";
	test4_ovr = new Image();
	test4_ovr.src = "images/menu_04on.gif";
	test4_off = new Image();
	test4_off.src = "images/menu_04.gif";
	test5_ovr = new Image();
	test5_ovr.src = "images/menu_05on.gif";
	test5_off = new Image();
	test5_off.src = "images/menu_05.gif";
	test6_ovr = new Image();
	test6_ovr.src = "images/menu_06on.gif";
	test6_off = new Image();
	test6_off.src = "images/menu_06.gif";
	test7_ovr = new Image();
	test7_ovr.src = "images/menu_07on.gif";
	test7_off = new Image();
	test7_off.src = "images/menu_07.gif";
	test8_ovr = new Image();
	test8_ovr.src = "images/menu_08on.gif";
	test8_off = new Image();
	test8_off.src = "images/menu_08.gif";

}

var origWidth, origHeight;
if (document.layers) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

// link style change
var cur_link;
function doLinkClass(lnk) {
  if (lnk && lnk.blur) lnk.blur();	// remove marquee
  if (!lnk || cur_link == lnk) return;
  if (cur_link) cur_link.className = "done";
  lnk.className = "on";
  cur_link = lnk;
}

var cur_lyr;	// holds id of currently visible layer
function swapLayers(lnk,id) {
  doLinkClass(lnk);
  if (cur_lyr) hideLayer(cur_lyr);
  showLayer(id);
  cur_lyr = id;
}

function showLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.display = "block";
}

function hideLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.display = "none";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? getLyrRef(id,document): null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}

// get reference to nested layer for ns4
// from old dhtmllib.js by Mike Hall of www.brainjar.com
function getLyrRef(lyr,doc) {
	if (document.layers) {
		var theLyr;
		for (var i=0; i<doc.layers.length; i++) {
	  	theLyr = doc.layers[i];
			if (theLyr.name == lyr) return theLyr;
			else if (theLyr.document.layers.length > 0) 
	    	if ((theLyr = getLyrRef(lyr,theLyr.document)) != null)
					return theLyr;
	  }
		return null;
  }
}

function init(id,lyr) {
  var lnk = getElemRefs(id);
  swapLayers(lnk,lyr);
}