/* 
 * The script to set the seo content div's X position
 */

/*
 * Tests which browser is viewing the file by testing the User Agent
 */
function TestBrowser()
{
    if(/Firefox/.test(navigator.userAgent)) return 'Firefox';
    if(/MSIE/.test(navigator.userAgent)) return 'MSIE';
    if(/Chrome/.test(navigator.userAgent)) return 'Chrome';
    if(/Safari/.test(navigator.userAgent)) return 'Safari';
    else return 'Other';
}

/*
 * FudgeFactor is the factor to add to the holder div's offsetTop to position
 * the content correctly
 */
function FudgeFactor(){
    browserName=TestBrowser();
//	alert('Browser is '+browserName+'\n');
    switch(browserName){
	case 'Firefox': return 203;
			break;

	case 'MSIE':    return 213;
			break;
	case 'Chrome':  return 222;
			break;
	default:	    return 222;
    }
}

window.onload=function(){
    var overlayDiv=document.getElementById("seoCategoryDescription");
    var holderDiv=document.getElementById("seoCategory");
    overlayDiv.style.top=holderDiv.offsetTop+FudgeFactor()+'px';
    overlayDiv.style.zindex='100';
//    alert('Overlay :\nstyle Top is '+overlayDiv.style.top+'\nHolder:\n style top is '+holderDiv.offsetTop+' px');
}