var contentObj;   // refer  the  content of  <div>
function getAjaxFile(urlPage) {
	xmlHttp=CreateHttpObject()
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request")
		return
	} 
	xmlHttp.onreadystatechange=stateChanged
	xmlHttp.open("GET",urlPage,true)
	xmlHttp.send(null)
}
function stateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
	    contentObj.innerHTML=xmlHttp.responseText 
	 } 
} 
function getAjaxFile1(urlPage) {
	xmlHttp=CreateHttpObject()
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request")
		return
	} 
	xmlHttp.onreadystatechange=stateChanged1
	xmlHttp.open("GET",urlPage,true)
	xmlHttp.send(null)
}
function stateChanged1() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
	    contentObj.innerHTML=xmlHttp.responseText;
		SelectMyNews();
	 } 
}

function CreateHttpObject() { 
	var objXMLHttp=null
	try {
		objXMLHttp = new ActiveXObject("Msxml2.XMLHTTP");
    } 
	catch (e) {
			try {
				objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch (err) {
				objXMLHttp = null;
			}
    }
	if(!objXMLHttp && typeof XMLHttpRequest != "undefined")
		objXMLHttp = new XMLHttpRequest();
return objXMLHttp
}


var browser=navigator.appName;
var version=navigator.appVersion;
var index=version.lastIndexOf("Safari");
var newsIndice=0;

var heightCadres;
heightCadres=30;
var bottomHeight;
bottomHeight=0;

function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}

function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}


function show(id) {
	document.getElementById(id).style.display='block';	 
}
function hide(id) {
	document.getElementById(id).style.display='none';	 
}
function switchImage(imgName, imgSrc) 
{
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images[imgName].src = imgSrc;
    }
  }
}
function showPage1() {
	document.getElementById('divDrag1').style.display='block';	 
}
function HidePage1() {
	document.getElementById('divDrag1').style.display= 'none';	
}
function showPage2() {
	document.getElementById('divDrag2').style.display='block';	 
}
function HidePage2() {
	document.getElementById('divDrag2').style.display= 'none';	
}
function showPage3() {
	document.getElementById('divDrag3').style.display='block';	 
}
function HidePage3() {
	document.getElementById('divDrag3').style.display= 'none';	
}
function openCareer(id1,id2) {
 	document.getElementById('mizeFrame').src="contentCareer.asp?id="+id2;
	document.getElementById('positionCareerId').innerHTML=id1; 
	if (browser=="Netscape") {
 		leftWidth=parseInt(document.getElementById('verticalMT').value);
 	}
	else {
 		leftWidth=parseInt(document.getElementById('verticalMT').value)+f_scrollTop();
	}
    document.getElementById('careerPopId').style.left=parseInt(document.getElementById('horizontalMT').value)-298+"px";
	document.getElementById('careerPopId').style.top=leftWidth-393+"px";
	document.getElementById('divDrag2').style.height=document.getElementById('CenterPage').offsetHeight+bottomHeight+"px";    
	showPage2();
}
function OpenNews(id,id2) {
	newsIndice=id2;
	document.getElementById('containerNews').innerHTML="<div style='position:relative;width:151px;text-align:center;margin-top:25px;'><img src='images/ajax-loader.gif' width='16' height='16' align='middle' /></div>";	
    contentObj=document.getElementById('containerNews');
	getAjaxFile1("rightNews.asp?id="+id);	
}
function SelectMyNews() {
  for (i=1;i<=3;i++) {
	  document.getElementById('RightNewsOver'+i).className="classNewsOut"   
  }
  document.getElementById('RightNewsOver'+newsIndice).className="classNews1"   
}
function openLocation() {
	if (browser=="Netscape") {
 		leftWidth=parseInt(document.getElementById('verticalMT').value);
 	}
	else {
 		leftWidth=parseInt(document.getElementById('verticalMT').value)+f_scrollTop();
	}
    document.getElementById('locationPopId').style.left=parseInt(document.getElementById('horizontalMT').value)-240+"px";
	document.getElementById('locationPopId').style.top=leftWidth-531+"px";
	document.getElementById('divDrag1').style.height=document.getElementById('CenterPage').offsetHeight+bottomHeight+"px";    
	showPage1();
}
function openContact() {
	document.getElementById('sendMessageContact').innerHTML="";
	document.contactForm.reset();
	ResetContact();
	if (browser=="Netscape") {
 		leftWidth=parseInt(document.getElementById('verticalMT').value);
 	}
	else {
 		leftWidth=parseInt(document.getElementById('verticalMT').value)+f_scrollTop();
	}
    document.getElementById('contactPopId').style.left=parseInt(document.getElementById('horizontalMT').value)-661+"px";
	document.getElementById('contactPopId').style.top="30px";
	document.getElementById('divDrag3').style.height=document.getElementById('CenterPage').offsetHeight+bottomHeight+"px";    
	showPage3();
}

function ResetContact() {
	document.getElementById('row1').className="textFieldRoww";	
	document.getElementById('row2').className="textFieldRoww";	
	document.getElementById('row3').className="textFieldRoww";	
	document.getElementById('row4').className="centerBgArea";	

}
function removeRed(id,sourceId) {
if (id != 4) {
	if (document.getElementById(sourceId).value != "")
		document.getElementById('row'+id).className="textFieldRoww";
	else
	    document.getElementById('row'+id).className="textFieldRowwRed";  
}
else {
	if (document.getElementById(sourceId).value != "")
	     document.getElementById('row'+id).className="centerBgArea";		
	else
	     document.getElementById('row'+id).className="centerBgAreaRed";		

}
if (id == 3) {
	emailContact1=document.getElementById('emailContact').value;
	AtPos = emailContact1.indexOf("@")
	StopPos = emailContact1.lastIndexOf(".")
	if (AtPos == -1 || StopPos == -1) {
 		document.getElementById('row3').className="textFieldRowwRed";
	}
	else {
		document.getElementById('row3').className="textFieldRoww";

	}
}
}
<!--

// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0
var tempY = 0

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
	try {	
	  if (IE) { // grab the x-y pos.s if browser is IE
		tempX = event.clientX + document.body.scrollLeft
		tempY = event.clientY + document.body.scrollTop
	  } else {  // grab the x-y pos.s if browser is NS
		tempX = e.pageX
		tempY = e.pageY
	  }  
	}
	catch(err)
	{
	
	}
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  try {	
  document.getElementById('horizontalMT').value=tempX;
  document.getElementById('verticalMT').value=tempY;
  }
  catch(err)
	{
	
	}
  return true
}
//-->
function saveContact() {
	contentObj=document.getElementById('insertNws');
	contactName1=document.getElementById('contactname').value;
	phoneNumber1=document.getElementById('phonenumberContact').value;
	mobileNumber1=document.getElementById('mobileNumber').value;
	emailContact1=document.getElementById('emailContact').value;
	PositionContact1=document.getElementById('PositionContact').value;
	country1=document.getElementById('countryContact').value;
	CompanyContact1=document.getElementById('CompanyContact').value;
	Message1=document.getElementById('messageContact').value;
	messageQuery="";
     
	AtPos = emailContact1.indexOf("@")
	StopPos = emailContact1.lastIndexOf(".")
	if (AtPos == -1 || StopPos == -1) {
		if (messageQuery.length == 0) messageQuery = messageQuery + "The following error(s) occurred:\n";
		messageQuery = messageQuery + "valid Billing email Address\n";
		document.getElementById('row3').className="textFieldRowwRed";
	}
	else {
		document.getElementById('row3').className="textFieldRoww";
	}
	if (contactName1 == "" ) {
		if (messageQuery.length == 0) messageQuery = messageQuery + "The following error(s) occurred:\n";	
		messageQuery = messageQuery + "Contact Name is required. \n";
		document.getElementById('row1').className="textFieldRowwRed";
	}
	else {
		document.getElementById('row1').className="textFieldRoww";
	}
	if (phoneNumber1 == "" ) {
		if (messageQuery.length == 0) messageQuery = messageQuery + "The following error(s) occurred:\n";	
		messageQuery = messageQuery + "Phone Number is required.\n";
		document.getElementById('row2').className="textFieldRowwRed";
	}
	else {
		document.getElementById('row2').className="textFieldRoww";
	}
	if (Message1 == "" ) {
		if (messageQuery.length == 0) messageQuery = messageQuery + "The following error(s) occurred:\n";	
		messageQuery = messageQuery + "Message is required.\n";
		document.getElementById('row4').className="centerBgAreaRed";

		
	}
	else {
		document.getElementById('row4').className="centerBgArea";
	}
	if (messageQuery == "") {
		var poststr = "contactName="+encodeURI(contactName1)+"&phoneNumber="+encodeURI(phoneNumber1)+"&mobileNumber="+encodeURI(mobileNumber1)+"&emailContact="+encodeURI(emailContact1)+"&Message="+encodeURI(Message1)+"&country="+encodeURI(country1)+"&position="+encodeURI(PositionContact1)+"&company="+encodeURI(CompanyContact1);
		postAjaxFile("send-Contact.asp",poststr);
	}
	else {
		//alert(messageQuery);
	}
}
function postAjaxFile(urlPage,parameters) {
	xmlHttpPost=CreateHttpObject()
	if (xmlHttpPost==null) {
		alert ("Browser does not support HTTP Request")
		return
	} 
	xmlHttpPost.onreadystatechange=stateChangedPost
	xmlHttpPost.open("POST",urlPage,true);
	xmlHttpPost.setRequestHeader("Content-type", "application/x-www-form-urlencoded");   
	//alert(parameters)
	xmlHttpPost.setRequestHeader("Content-length", parameters .length);   
	xmlHttpPost.setRequestHeader("Connection", "close"); 
	xmlHttpPost.send(parameters)
	
}

function stateChangedPost() { 
	if (xmlHttpPost.readyState==4 || xmlHttpPost.readyState=="complete") { 
	    contentObj.innerHTML=xmlHttpPost.responseText;
		closePopup();
	 } 
}

function closePopup() {
    resultInsert1=document.getElementById('resultInsert').value;
    if (resultInsert1 == "" ) {
	    document.getElementById('sendMessageContact').innerHTML="Your Email has been sent."; 
	    setTimeout("HidePage3()",3000);
		
		
   }
   
}
function CreateHttpObject() { 
	var objXMLHttp=null
	try {
		objXMLHttp = new ActiveXObject("Msxml2.XMLHTTP");
    } 
	catch (e) {
			try {
				objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch (err) {
				objXMLHttp = null;
			}
    }
	if(!objXMLHttp && typeof XMLHttpRequest != "undefined")
		objXMLHttp = new XMLHttpRequest();
return objXMLHttp
}