// JavaScript Document
function overAction(obj, bInsert)
{
    if (bInsert == false)
        obj.style.cursor='pointer'

	var insertSpan = bInsert;
	if(obj.className.indexOf('current') < 0)
	{
		obj.className += ' current';
	}
	children = obj.childNodes;
	for(i=0; i < children.length;i++)
	{
		if(children[i].nodeName == 'SPAN')
		{
			insertSpan = false;
		}
	}
	if(insertSpan)
	{
		obj.innerHTML = '<span></span>' + obj.innerHTML;
	}
}

function outAction(obj)
{
	obj.className = obj.className.replace(new RegExp(" current\\b"), "");
	children = obj.childNodes;
	for(i=0; i < children.length;i++)
	{
		if(children[i].nodeName == 'SPAN')
		{
			children[i].parentNode.removeChild(children[i]);
		}
	}
}


function TransferToURL(url)
{
    this.window.location=url;
}

function overImage(obj)
{
    var id=obj.id+"_a";
    document.getElementById(id).style='position: absolute; left: 20px; top: 70px;display:block;';
    
	if(obj.className.indexOf('current') < 0)
	{
		obj.className += ' current';
	}
}

function outImage(obj)
{
    document.getElementById('Ctl001_HomeContentLeft_Ctl00'+obj.id).style='position: absolute; left: 20px; top: 70px;display:none;';
	obj.className = obj.className.replace(new RegExp(" current\\b"), "");
	children = obj.childNodes;
	for(i=0; i < children.length;i++)
	{
		if(children[i].nodeName == 'SPAN')
		{
			children[i].parentNode.removeChild(children[i]);
		}
	}
}

function StrechButton(btnToStrech, btnRef, btnCompare)
{
    
	var lis = document.getElementById('menu').getElementsByTagName('li');
	var width =0;
	for(var i =0;i<lis.length;i++){
	    width += lis[i].offsetWidth;
	}
    var diff = 978 - width;

    alert(width);
    document.getElementById(btnToStrech).offsetWidth = document.getElementById(btnToStrech).offsetWidth + width;
    alert(document.getElementById(btnToStrech).offsetWidth);
}

function HideHomeRightContent()
{
    var leftcontent = document.getElementById('container_left')
    var rightcontent = document.getElementById('container_right')
    if (leftcontent)
    {
	    children = leftcontent.childNodes;
	    for(i=0; i < children.length;i++)
	    {
		    if(children[i].nodeName == 'CONTENT')
		    {
    		    alert("content");
		    }
	    }
       leftcontent.setAttribute("width","816px");
        if (rightcontent)
        {
            rightcontent.setAttribute("width","0px");
             rightcontent.setAttribute("visible","false");
        }
        
    }
}
function PostPaypal(varThis)
{
    document.forms[1].submit();
}

          function AlignfooterTags(){
               var leftcontent = jQuery("#container_left");
               if (leftcontent != null)
               {
                  var leftheight=jQuery("#container_left").height();
                  var rightheight=jQuery("#container_right").height();
                  if (leftheight < rightheight)
                  {
                    jQuery("#container_left").height(rightheight)
                  }
              }
          }
