﻿function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		Home_over = newImage("images/Home-over.gif");
		About_TmS_over = newImage("images/About-TmS-over.gif");
		Implementation_over = newImage("images/Implementation-over.gif");
		Communication_over = newImage("images/Communication-over.gif");
		Administration_over = newImage("images/Administration-over.gif");
		Clients_over = newImage("images/Clients-over.gif");
		FAQ_over = newImage("images/FAQ-over.gif");
		News_over = newImage("images/News-over.gif");
		Contact_TmS_over = newImage("images/Contact-TmS-over.gif");
		Login_over = newImage("images/Login-over.gif");
		preloadFlag = true;
	}
}

function setHeight()
{
     hgt= document.getElementById('main').offsetHeight;
     document.getElementById("t1").style.height = hgt +'px';
     document.getElementById("t2").style.height = hgt +'px';
     document.getElementById("t3").style.height = hgt +'px';
}

function launchCenter(url, name, height, width) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  return window.open(url, name, str);
}

 function goToURL(form)
            {var myindex=form.dropdownmenu.selectedIndex
            if(!myindex=="")
            {window.location.href=form.dropdownmenu.options[myindex].value;}
            }
