function show_country(event){
		x=event.clientX-10;
		y=event.clientY
		document.getElementById('countryDiv').style.marginLeft = Math.max(0, (x))+'px';
		document.getElementById('countryDiv').style.marginTop = Math.max(0, (y))+'px';
		document.getElementById('countryDiv').style.display = '';
	}
  function search(){
	  if(!document.getElementById("SearchFormTop").q.value == ''){
	   document.getElementById("SearchFormTop").currentPage.value="1";
	 	 document.getElementById("SearchFormTop").submit()
	 	}
  }
  function searchDevices(){
    if(!document.getElementById("SearchFormMain").productFinder_search.value == ''){
     document.getElementById("SearchFormMain").currentPage.value="1";
  	 document.getElementById("SearchFormMain").submit()
  	}
 }
  function findPos(obj) {
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) {
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		}
		return [curleft,curtop];
  }


 function setupDivs(){

		 pos = findPos(document.getElementById('tax_left'));
		 pos_rt = findPos(document.getElementById('tax_right'));
	   //make the 2 middle divs the same height:
	   var maxH = Math.max(document.getElementById('tax_left').offsetHeight,document.getElementById('tax_mid').offsetHeight);
		 document.getElementById('tax_left').style.height=maxH+'px';
	   document.getElementById('tax_mid').style.height=maxH+'px';
	   //move the bottom left div under the 2 middle divs:
	   var blc = document.getElementById('bottom_left_content');
	   blc.style.position="absolute";
		 blc.style.left = pos[0]+"px";
	   blc.style.top =  (pos[1] + maxH + 15) +"px";
	   //move the bottom right div under the right tax
	   var brc = document.getElementById('bottom_right_content');
	   var t_h = document.getElementById('tax_right').offsetHeight;
	   var nci = document.getElementById('newsCareersInvestors');
	   nci = (nci == null)? 0 : nci.offsetHeight + 20;
	   brc.style.position="absolute";
		 brc.style.left = pos_rt[0]+"px";
	   brc.style.top =  (pos_rt[1] + t_h + 15 + nci) +"px";
	   //now resize content height
	   cont = document.getElementById('content');
	   pos_cont = findPos(cont);
	   cont_h = cont.offsetHeight;
	   new_h = maxH + blc.offsetHeight - 20; //(35 - 15) the tax div's top is -35
	   new_h = Math.max(new_h, (pos_rt[1] + t_h + 15 + nci - brc.offsetHeight));
	   cont.style.height=new_h+"px";
	   //now set the correct height of the bottom right div..
	   if(brc.offsetHeight < (new_h - t_h)){ //if the div is really small, resize it to look good
			 brc_h = new_h - t_h - nci;
			 brc.style.height = brc_h + 8 + "px";
	   } else { //otherwise the div is bigger then the content div, resize the content div
		 cont.style.height=brc.offsetHeight+ t_h + "px";
	   }
	   //at last, if the promos on the very left are too long, we need to fix some stuff:
	   pos_foot = findPos(document.getElementById('footer'));
	   if((pos_cont[1] + new_h + 50) < pos_foot[1] - 1){ //50 is padding-bottom of content, border=1 
			cont.style.height = pos_foot[1] - pos_cont[1] + "px";
	   }
 }