<!--

function openWindow(file, width, height) {
	var left;
	var top;
	left = (screen.availWidth - width) / 2;
	top = (screen.availHeight - height) / 2;
	window.open(file, '', 'top=' + top + ' , left=' + left + ' , width=' + width + ' , height=' + height + ' , scrollbars=no');
}

function openToolbarWindow(file, width, height) {
	var left;
	var top;
	left = (screen.availWidth - width) / 2;
	top = (screen.availHeight - height) / 2;
	window.open(file, '', 'top=' + top + ', left=' + left + ', width=' + width + ', height=' + height + ', resizable=yes, menubar=yes, toolbar=yes, scrollbars=yes');
}

function openHiddenWindow(file) {
	var left;
	var top;
	var newWindow;
	left = (screen.availWidth - 1) / 2 + 2000;
	top = (screen.availHeight - 1) / 2 + 2000;
	newWindow = window.open(file, '', 'top=' + top + ' , left=' + left + ' , width=' + 1 + ' , height=' + 1 + ' , scrollbars=no');
	newWindow.blur();
}

function quickLink(dropdown) {
	var address;
	address = dropdown.options[dropdown.selectedIndex].value;
	window.alert(address);
	if ( address != '#' ) {
		window.location = address;
	}
}

function getObject(name) {
	var object;	
	if (document.getElementById) {
		object = document.getElementById(name);
	}
	else if (document.all) {
		object = document.all[name];
	}
	else if (document.layers) {
		object = document.layers[name];
	}
	return object;
}	

function showCall() {
	var objImage = document.getElementById('imgQuestions')
	var objDiv = document.getElementById('divCall')
	document.getElementById('divContact').style.display = 'none';
	document.getElementById('divEmail').style.display = 'none';
    //alert('findposy=' + findPosY(objImage));  this always results in 130
	objDiv.style.top = findPosY(objImage) + 78 + 'px';
    //objDiv.style.left = findPosX(objImage) + -23 + 'px';
    // width of image is 189
    // width of call div is 200
    objDiv.style.left = findPosX(objImage) + -16 + 'px';
	objDiv.style.display = 'block';
    setdivcallparams();
}

function showContact() {
	var objImage = document.getElementById('imgQuestions')
	var objDiv = document.getElementById('divContact')
	document.getElementById('divCall').style.display = 'none';
	document.getElementById('divEmail').style.display = 'none';
	objDiv.style.top = findPosY(objImage) + 78 + 'px';
    //objDiv.style.left = findPosX(objImage) + -23 + 'px';
    objDiv.style.left = findPosX(objImage) + -16 + 'px';
	objDiv.style.display = 'block';
    setdivcontactparams();
}

function showEmail() {
	var objImage = document.getElementById('imgQuestions')
	var objDiv = document.getElementById('divEmail')
	document.getElementById('divCall').style.display = 'none';
	document.getElementById('divContact').style.display = 'none';
    //alert('findposy=' + findPosY(objImage));  this always results in 130
	objDiv.style.top = findPosY(objImage) + 78 + 'px';
    //objDiv.style.left = findPosX(objImage) + -23 + 'px';
    // width of image is 189
    // width of call div is 200
    objDiv.style.left = findPosX(objImage) + -16 + 'px';
	objDiv.style.display = 'block';
    setdivemailparams();
}
function showEmailOld() {
	var objImage = document.getElementById('imgQuestions')
	var objDiv = document.getElementById('divEmail')
	document.getElementById('divCall').style.display = 'none';
	document.getElementById('divContact').style.display = 'none';
	//objDiv.style.top = findPosY(objImage) + 78 + 'px';
    //objDiv.style.left = findPosX(objImage) + -23 + 'px';
    // need to get the actual top & left of the image and set the div accordingly ***********************************
	objDiv.style.display = 'block';
}

function closePopUp() {
	document.getElementById('divCall').style.display = 'none';
	document.getElementById('divContact').style.display = 'none';
	document.getElementById('divEmail').style.display = 'none';
}

function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }


//-->
