function returnObjById(id){ if (document.getElementById) var returnVar = document.getElementById(id); else if (document.all) var returnVar = document.all[id]; else if (document.layers) var returnVar = document.layers[id]; return returnVar; };
function placeSearch()
{
    var elm = returnObjById('searchpos');
    var sbox = returnObjById('searchBox');
    if (null==elm)
    {
	if (sbox && sbox.parentNode)
	{
		sbox.parentNode.removeChild(sbox);
	}
	return ;
    }
    var ie = 0;
    try { if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { ie = 1;}}
    catch(e) { ie = 0; }
    if(ie)
    {
        //elm.style.verticalAlign='top';
        //elm.style.marginTop='0px';
        // 851 and 106 for IE versus 852 and 105 for Mozilla
	    var sboxctl = returnObjById('sboxctl');
		if (4==parseInt(navigator.appVersion))
		{
			if (navigator.userAgent.toLowerCase().indexOf("msie 6.")!=-1)
			{
				// ie6
	        	sbox.style.left='595px';
	        	sbox.style.top='-40px';
			}else if (navigator.userAgent.toLowerCase().indexOf("windows nt 6")!=-1)
			{
	        	// Vista acts differently
				sbox.style.left='820px';
				sbox.style.width='106px';
			}else
			{
	        	sbox.style.left='851px';
			}
		}else
		{
	        	sbox.style.left='851px';
		}
	
	    if (null!=sboxctl)
	    {
	    	sboxctl.style.width='106px';
	    }
    }
    elm.appendChild(sbox);
    sbox.style.visibility = 'visible';
}
function placeSearch2()
{
    var elm = returnObjById('searchpos');
    var sbox = returnObjById('searchBox');
    if (null==elm)
    {
	if (sbox && sbox.parentNode)
	{
		sbox.parentNode.removeChild(sbox);
	}
	return ;
    }
	if (null!=sbox) {
    elm.appendChild(sbox);
    sbox.style.visibility = 'visible';
	}
}

