function PutFlash(ID, FileName, Width, Height, Scale, WMode)
{
	var FlashStr;
    FlashStr = '<OBJECT id="' + ID + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="' + Width + '" HEIGHT="' + Height + '" ALIGN="">';
    FlashStr = FlashStr + '<PARAM NAME=movie VALUE="' + FileName + '">';
    FlashStr = FlashStr + '<PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#4B7388>';
    FlashStr = FlashStr + '<PARAM NAME="Scale" VALUE="' + Scale + '">';
    FlashStr = FlashStr + '<PARAM NAME="WMode" VALUE="' + WMode + '">';
    FlashStr = FlashStr + '<EMBED src="' + FileName + '" quality="high" bgcolor="#4B7388"  WIDTH="' + Width + '" HEIGHT="' + Height + '" swLiveConnect=true ID="' + ID +'" NAME="' + ID + '" ALIGN="middle" scale="' + Scale +'" WMode="' + WMode + '" allowScriptAccess="sameDomain" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"/>';
    FlashStr = FlashStr + '</OBJECT>';
    document.write(FlashStr);
}

var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

// Handle all the FSCommand messages in a Flash movie.
function main_DoFSCommand(command, args) {
    //var menuObj = isInternetExplorer ? document.all.menu : document.menu;
    if (command == "index_ar") window.open("index.php?lang=ar", "_self");
    else if (command == "index_en") window.open("index.php?lang=en", "_self");
    else if (command == "index_fr") window.open("index.php?lang=fr", "_self");
    else if (command == "ar") window.open("index.php?lang=ar", "_self");
    else if (command == "en") window.open("index.php?lang=en", "_self");
    else if (command == "fr") window.open("index.php?lang=fr", "_self");
    else if (command == "about") window.open("/ar/about.html", "_self");
}

function menu_DoFSCommand(command, args) {
    if (command == "products_ar") window.open("?index.php?lang=ar&c=1337", "_self");
    else if (command == "products_en") window.open("index.php?lang=en&c=1337", "_self");
    else if (command == "products_fr") window.open("index.php?lang=fr&c=1337", "_self");
    
    else if (command == "how2by_ar") window.open('about.php?about=pofar','','width=700px,height=600px,top,center,scrollbars');
    else if (command == "how2by_en") window.open('about.php?about=pofen','','width=700px,height=600px,top,center,scrollbars');
    else if (command == "how2by_fr") window.open('about.php?about=poffr','','width=700px,height=600px,top,center,scrollbars');
    
    else if (command == "support_ar") window.open('about.php?about=supportar','','width=700px,height=600px,top,center,scrollbars');
    else if (command == "support_en") window.open('about.php?about=supporten','','width=700px,height=600px,top,center,scrollbars');
    else if (command == "support_fr") window.open('about.php?about=supportfr','','width=700px,height=600px,top,center,scrollbars');
    
    else if (command == "contacts_ar") window.open('about.php?about=contactar','','width=720px,height=460px,top,center,noscrollbars');
    else if (command == "contacts_en") window.open('about.php?about=contacten','','width=720px,height=460px,top,center,noscrollbars');
    else if (command == "contacts_fr") window.open('about.php?about=contactfr','','width=720px,height=460px,top,center,noscrollbars');
}

// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub menu_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call menu_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('Sub main_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call main_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
