var winw, posdoc=document.getElementById("idpos"), browse, posleft, preloadFlag = false, tjpopwindow, mappopwindow;
var repd=document.getElementById("idrep"), extd=document.getElementById("idext"), qad=document.getElementById("idqa"), 
tstd=document.getElementById("idtst");

window.onunload = closepopup;

if (document.all)
  browse = "ie";
else
  browse = "nn";
if(navigator.appName == "Netscape")
  window.captureEvents(Event.MOUSEMOVE);

function set_pos()
{
  winw = document.body.clientWidth;
  if (winw > 770)
    posleft =  (winw - 770)/2;
  else
    posleft = 0;
    posdoc.style.left=posleft + "px";
    repd.style.left=posleft + 204 + "px";
    extd.style.left=posleft + 540 + "px";
    qad.style.left=posleft + 235 + "px";
    tstd.style.left=posleft + 509 + "px";
    repd.style.zIndex=10;
    extd.style.zIndex=10;
    qad.style.zIndex=10;
    tstd.style.zIndex=10;
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}
function mappopup()
{
   if (mappopwindow != null) mappopwindow.close();
   mappopwindow= window.open("http://www.multimap.com/map/browse.cgi?client=public&search_result=&db=pc&lang=&keepicon=true&pc=NE650PR&advanced=&client=public&addr2=&quicksearch=NE65%200PR&addr3=&addr1=",
  		 "", "top=30, left=5, width=790, height=450, scrollbars, resizable");
}
function tjpopup(popurl)
{
   if (tjpopwindow != null) tjpopwindow.close();
   tjpopwindow= window.open(popurl, "", "top=5, left=5, width=795, height=570, scrollbars, resizable");
}

function closepopup()
{
  if (mappopwindow != null) mappopwindow.close();
  if(tjpopwindow != null) tjpopwindow.close();
}