// functions added by rrodkin on 18apr2007
// dynamically positions QuotemwatchDiv based on whether in cbol wrapped version or not

/* note that startTimer(), which kicks off the whole process, is actually called
from the window.onload event in /js/01_topnav.js or /js/new/02_loader.js.  Had to do this to avoid interfering with onload events and throwing the dreaded 'not implemented' error.

*/

function initMwatchDiv(whichDiv){
	//document.getElementById(whichDiv).style.top = 244;
	document.getElementById(whichDiv).style.top = 280;
}
// need timer functions to pick up the div
var id = null;
var count = 0;
function startTimer(){
	id = setTimeout("startTimer()",1);	
	divCheck();	
}

function divCheck(){
	count++
	var d = null;
	if(document.getElementById("QuotemwatchDiv")!=null){
		d = "QuotemwatchDiv";
		killCheck(d);
	}
	else if(document.getElementById("mwatchDiv")!=null){
		d = "mwatchDiv";
		killCheck(d);
	}
	else if(count==20){
		d=null;
		killCheck(d);	
	}
}

function killCheck(whichDiv){
	clearTimeout(id);
	count = 0;
	if(whichDiv==null) return;
	else{
		initMwatchDiv(whichDiv);
	}
	
}