function writemovie (vidfile) {
document.write('<object id="MediaPlayer" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" WIDTH=320 HEIGHT=275 codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" ');
document.write(' standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">\n');
document.write('<PARAM NAME="autoStart" VALUE="False">\n');
document.write('<param name="FileName" value="'+vidfile+'">\n');
document.write('<param name="ShowStatusBar" value="False">\n');
document.write('<param name="ShowControls" value="True">\n');
document.write('<param name="ShowDisplay" value="False">\n');
document.write('<PARAM NAME="AnimationAtStart" VALUE="True">\n');
document.write('<embed TYPE="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"');
document.write(' src="'+vidfile+'" WIDTH="320" HEIGHT="275" ');
document.write('Name="MediaPlayer" autostart=0 AnimationAtStart=0 ShowControls=1 ShowStatusBar=0 ShowDisplay=0></embed>\n');
document.write('</object>\n');
}
	
	
	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];
  }
 }
}

var preloadFlag = false;
function preloadImages() {
 if (document.images) {
  nav_tilde_on = newImage("images/arrow_black_down.gif");
  preloadFlag = true;
 }
}

//DROP DOWNS
var show = new Array();
show['products']=0;


//Reload on resize
var origWidth, origHeight;
if (document.all) {
 onresize = function() { window.location.reload(); } 
} else {
  origWidth = window.innerWidth;
  origHeight = window.innerHeight;
  onresize = function() { if(innerWidth != origWidth || innerHeight != origHeight) location.reload(); }
}

function initEventHandlers () {
 if (document.layers) {
  document.products.onmouseover =  function () { show['products']=1; };  document.products.onmouseout = function () {preHide('products'); }
  }
}

function preHide(menu) {
 window.status=''
 show[menu]=0;
 setTimeout("hideMenu('" + menu + "')",300);
 return true;
}

function preShow(menu,desc) {
 window.status=desc;
 show[menu]=1;
 hideAll();
 showMenu(menu);
 return true;
}

function preShowSec(menu,desc) {
 window.status=desc;
 show[menu]=1;
 showMenu(menu);
 return true;
}

function hideMenu(menu) {
 if (show[menu]==0) {
    if (document.getElementById && document.getElementById(menu) != null)
         node = document.getElementById(menu).style.visibility='hidden';
    else if (document.layers && document.layers[menu] != null)
        document.layers[menu].visibility = 'hidden';
    else if (document.all)
         document.all[menu].style.visibility = 'hidden';
 }
}

function showMenu(menu) {
    if (document.getElementById && document.getElementById(menu) != null)
         node = document.getElementById(menu).style.visibility='visible';
    else if (document.layers && document.layers[menu] != null)
        document.layers[menu].visibility = 'visible';
    else if (document.all)
         document.all[menu].style.visibility = 'visible';
}


function hideAll() {
 hideMenu('products');('products_services');
 show['products']['products_services']=1;
}

  function launch(page)
  {
//    alert(page + " | " + width + " | " + height);
    var _popup;
	var width2 = 350;
	var height2 = 350;
    if (_popup != null) {
	 _popup.close();
	} 
    _popup = window.open("image_popup.php?image_name="+page,"none","width="+width2+",height="+height2+",toolbar=no,scrollbars=no,resizable=no,location=no,status=no,screenx=10,screeny=10,left=50,top=50");
	_popup.focus();
  }