
function loadImage(name, src) {
  eval(name + " = new Image();");
  eval(name + '.src = "'+src+'";');
}

function changeImage(dpic, pic) {
  if (document.images && (preloadFlag == true))
    eval("document.images['"+dpic+"'].src="+pic+".src;");
}

function enable(what) {
  changeImage(what, what+'_');
}

function disable(what) {
  changeImage(what, what);
}

if (navigator.appName == "Netscape") {
  isNetscape = true;
  if (navigator.product!='Gecko') {
    isNS4 = true;
  }else{
    isNS4 = false;
    document.all = document.getElementsByTagName("*");
  }
}else{
  isNetscape = false;
  isNS4 = false;
}


var urls = new Array(
  "flash_banners1"         // 0
, "flash_games_package1"   // 1
, "benzcasino"            // 2
, "playersvegas"          // 3
, "directnetpay"          // 4
, "ladydream"             // 5
, "luckydogsports"        // 6
, "goldbetting"           // 7
                     );
function openProject(urlnum) {
  window.open('/projects/' +urls[urlnum]+ '.html', "project", "scrollbars=0,status=0,toolbar=0,directories=0,menubar=0,location=0,resizable=1,width=512,height=400").focus();
  return false;
}

function openISO() {
  var hISO = Math.min( window.screen.availHeight - 33, 701);
  var wnd = window.open('/iso.html', "iso", "scrollbars=1,status=0,toolbar=0,directories=0,menubar=0,location=0,resizable=1,width=512,height="+hISO);
  wnd.moveTo(isNetscape ? wnd.screenX : wnd.screenLeft, 0);
  wnd.focus();
  return false;
}

var jumps = new Array(
//
"/about.html",	//0
"/outsourcing-partnership.html", //1
"/offshore-software-development.html", //2
"/casino-gaming-software-developers.html", //3
"/contacts.html", //4

"/about.html", //5
"/team.html", //6	
"/quality-offshore-development.html", //7			

"/clients.html", //8
"/company_news.html", //9

"/outsource-project-process.html", //10
"/offshore-outsourcing-interaction.html", //11
"/support_policy.html", //12

"/russian-outsourcing-article.html", //13
 
"/offshore-software-development.html", //14
"/offshore-system-administration.html",	//15
"/offshore-software-testing.html",	//16
"/offshore-graphic-design.html", //17

"/management_accounting.html", //18
"/financial_system.html", //19
"/mlm.html", //20
"/alt_payment.html",//21
"/e-learning.html",//22
"/cluster.html",//23

"/outsourcing-partnership.html", //24
"/choosing-an-company-article.html", //25
"/advantages-of-offshore-outsourcing.html", //26

"/casino-gaming-software-developers.html", //27

 "http://www.intrice.com",
 "http://www.intrice.com"
);

function jumpURL(where){
  if (where=="-1") { 
     location.href = "http://www.intrice.com";  ///company/about.html
  } else {
     location.href = jumps[where];
  }
}
function getJump(where){
  if (where=="-1") { 
     location.href = "http://www.intrice.com";  ///company/about.html
  } else {
     location.href = jumps[where];
  }
}

cookieName = "openedmenu";
function setPage(openedMenu){
	document.cookie = escape(cookieName) + '=' + escape(openedMenu) + '; path = /; expires=';
}
function getPage(){
	var cookieValue = '0';
	var posName = document.cookie.indexOf(escape(cookieName) + '=');
	if (posName != -1) {
		var posValue = posName + (escape(cookieName) + '=').length;
		var endPos = document.cookie.indexOf(';', posValue);
		if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
		else cookieValue = unescape(document.cookie.substring(posValue));
	}
	return (cookieValue);
}

var haveflash=false;var f5I=false;var f6I=false;
var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;
var isMac=(navigator.appVersion.indexOf("Mac")!=-1)?true:false;
if(isIE&&!isMac){
 document.write('<SCRIPT LANGUAGE=VBScript\> \n');
 document.write('on error resume next \n');
 document.write('f5I=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n'); 
 document.write('f6I=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n'); 
 document.write('</SCR'+'IPT\> \n');
 if(f5I)flashVersion=5;
 if(f6I)flashVersion=6;
 if(f6I)haveflash=true;
}
if(navigator.plugins){                               
 if (navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){
  var isVersion2=navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
  var flashDescription=navigator.plugins["Shockwave Flash" + isVersion2].description;
  var flashVersion=parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
  if(flashVersion>=6)haveflash=true;
 }
}

// for testing gif menus
//haveflash=false;

var preloadFlag = false;
function preloadImages() {
  var menuitems = new Array('home','company',
    'outsourcingpartnership','services','techandsolutions','contactus');
  var submenuitems = new Array();
	if (1==tMenu) submenuitems = new Array('about','managementteam','qualitypolicy','supportpolicy','clients','companynews');
	if (2==tMenu) submenuitems = new Array('schemes','interaction','workingontheproject','russianoutsourcing', 'choosingancompany','advantages');
	if (3==tMenu) submenuitems = new Array('softwaredevelopment','softwaretesting','graphicaldesign','systemadministration');
	if (4==tMenu) submenuitems = new Array('clustersolutions','elearning','managementaccountingsystem','financialsystem','mlmsystem','alternativepaymentsystem');
  for (i=0; i<menuitems.length; i++) {
    loadImage(menuitems[i], "/img/buttons/"+menuitems[i]+".gif");
    loadImage(menuitems[i]+"_", "/img/buttons/"+menuitems[i]+"_.gif");
  }
  for (i=0; i<submenuitems.length; i++) {
    loadImage(submenuitems[i], "/img/buttons/"+submenuitems[i]+".gif");
    loadImage(submenuitems[i]+"_", "/img/buttons/"+submenuitems[i]+"_.gif");
  }
  preloadFlag = true;
}
if(!haveflash) preloadImages();
var ns = (navigator.appName=="Netscape")?true:false;
var h = ns? window.innerHeight-289: "100%";

// tMenu, tPoint, subNav, pageFlash must be defined on page

var movieParam = "tMenu="+tMenu+"&tPoint="+tPoint+"&isOpen=";
var referrer = getPage();
setPage(tMenu);
movieParam += ((referrer == tMenu) ? '0' : '1');

function menuItem(index,tp,url,name,alt,w,h) {
  var item = '<img name="'+name+'" border="0" src="/img/buttons/'+name+(index==tp?'_':'')+
	 '.gif" width="'+w+'" height="'+h+'" alt="'+alt+'" class="incell">';
  if(index != tp) {
    item = '<a href="'+url+'" onMouseOut="disable(\''+name+'\')" onMouseOver="enable(\''+name+'\')">'+item+'</a>';
  }
  return '<tr><td align="right" class="centerbar">'+item+'</td></tr>';
}

document.write(
'<tr height="40">'+
'<td height="40" width="30%"><img src="/img/z.gif" width="1" height="40" class="incell" alt=""></td>'+
'<td width="201"><img src="/img/z.gif" width="201" height="40" class="incell" alt=""></td>'+
'<td width="29"><img src="/img/z.gif" width="29" height="40" class="incell" alt=""></td>'+
'<td width="313"><img src="/img/z.gif" width="313" height="40" class="incell" alt=""></td>'+
'<td width="32"><img src="/img/z.gif" width="32" height="40" class="incell" alt=""></td>'+
'<td width="196"><img src="/img/z.gif" width="196" height="40" class="incell" alt=""></td>'+
'<td width="40%"><img src="/img/z.gif" width="1" height="40" class="incell" alt=""></td>'+
'</tr>'+
'<tr height="1"><td class="divline" height="1" colspan="7"><img src="/img/z.gif" border=0 width="1" height="1" class="incell" alt=""></td></tr>'+
'<tr height="248">'+
'<td height="248" class="centerbar"><img src="/img/z.gif" width="1" height="248" class="incell" alt=""></td>'
);

// menu

if (haveflash)
document.write(
'<td colspan="2" width="210" height="248" class="centerbar">'+
'<table cellpadding="0" cellspacing="0" border="0" class="centerbar">'+
'<tr><td class="centerbar" align="right">'+
'<a href="http://www.intrice.com" class="incell"><img src="/img/intrice-logo.gif" border=0 width="230" height="64" alt="Offshore software development in Russia" class="incell"></a>'+
'</tr><tr><td class="centerbar" align="right">'+
'<OBJECT class="incell" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+
' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"'+
' WIDTH=230 HEIGHT=184> <PARAM NAME=menu VALUE=false>'+
' <PARAM NAME=movie VALUE="/img/flash/menu.swf">'+
' <PARAM NAME=FlashVars VALUE="'+movieParam+'">'+
' <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF>'+
' <EMBED class="incell" src="/img/flash/menu.swf" FlashVars="'+movieParam+'" quality=high bgcolor=#FFFFFF menu=false WIDTH=230 HEIGHT=184 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>'+
'</OBJECT></td></tr></table></td>'
);
else {
document.write(
'    <td height="248" valign="top" align="right" class="centerbar">'+
'      <table cellpadding="0" cellspacing="0" border="0" class="centerbar">'+
'        <tr><td class="centerbar" align="right"><a href="http://www.intrice.com"><img src="/img/logo.gif" border=0 width="150" height="64" alt="Offshore software development in Russia" class="incell"></a></td></tr>'+
menuItem(0, tMenu, 'http://www.intrice.com', 'home', 'Home', 32, 16) +
menuItem(1, tMenu, '/about.html', 'company', 'Company', 54, 16)
);
if (1==tMenu) {
document.write(
  '<tr><td align="right" class="centerbar"><img border="0" src="/img/z.gif" width="162" height="5" alt="" class="incell"></td></tr>' +
  menuItem(0, tPoint, '/about.html', 'about', 'About Company', 85, 11) +
  menuItem(1, tPoint, '/team.html', 'managementteam', 'Our Team', 98, 11) +
  menuItem(2, tPoint, '/quality-offshore-development.html', 'qualitypolicy', 'Quality policy', 82, 11) +
  menuItem(3, tPoint, '/support_policy.html', 'supportpolicy', 'Support Policy', 84, 11) +
  menuItem(4, tPoint, '/clients.html', 'clients', 'Clients', 40, 11) +
  menuItem(5, tPoint, '/company_news.html', 'companynews', 'Company News', 79, 11)
);
}
document.write( 
menuItem(2, tMenu, '/outsourcing-partnership.html', 'outsourcingpartnership', 'Outsourcing Partnership', 157, 16)
);
if (2==tMenu) {
document.write(
  '<tr><td align="right" class="centerbar"><img border="0" src="/img/z.gif" width="162" height="5" alt="" class="incell"></td></tr>'+
  menuItem(0, tPoint, '/outsourcing-partnership.html', 'schemes', 'Outsourcing Partnership Schemes', 195, 11) +
  menuItem(1, tPoint, '/offshore-outsourcing-interaction.html', 'interaction', 'Offshore Outsourcing Interaction', 196, 11) +
  menuItem(2, tPoint, '/outsource-project-process.html', 'workingontheproject', 'Working on the Outsourcing Project', 186, 11) +
  menuItem(3, tPoint, '/russian-outsourcing-article.html', 'russianoutsourcing', 'Offshore Outsourcing in Russia', 176, 11) +
  menuItem(4, tPoint, '/choosing-an-company-article.html', 'choosing', 'Choosing an Offshore Outsourcing Company', 192, 11) +
  menuItem(5, tPoint, '/advantages-of-offshore-outsourcing.html', 'advantages', 'Advantages of Outsourcing Information Technology', 194, 11)
);
}
document.write(
menuItem(3, tMenu, '/offshore-software-development.html', 'services', 'Services', 53, 16)
);
if (3==tMenu) {
document.write(
  '<tr><td align="right" class="centerbar"><img border="0" src="/img/z.gif" width="162" height="5" alt="" class="incell"></td></tr>'+
  menuItem(0, tPoint, '/offshore-software-development.html', 'softwaredevelopment', 'Software Development', 124, 11) +
  menuItem(1, tPoint, '/offshore-system-administration.html', 'systemadministration', 'System Administration', 123, 11) +
  menuItem(2, tPoint, '/offshore-software-testing.html', 'softwaretesting', 'Software Testing', 97, 11) +
  menuItem(3, tPoint, '/offshore-graphic-design.html', 'graphicaldesign', 'Graphical Design', 94, 11)
);
}
document.write(
menuItem(4, tMenu, '/casino-gaming-software-developers.html', 'techandsolutions', 'Technologies and Solutions', 162, 16)
);
if (4==tMenu) {
document.write(
  '<tr><td align="right" class="centerbar"><img border="0" src="/img/z.gif" width="178" height="5" alt="" class="incell"></td></tr>'+
  menuItem(0, tPoint, '/casino-gaming-software-developers.html', 'casinogamingsoftwaredev', 'Online Gaming Software Systems', 128, 11) +
  menuItem(1, tPoint, '/cluster.html', 'clustersolutions', 'Distributed & Cluster Solutions', 184, 11) +
  menuItem(2, tPoint, '/e-learning.html', 'elearning', 'E-learning Technologies', 141, 11) +
  menuItem(3, tPoint, '/management_accounting.html', 'managementaccountingsystem', 'Management Accounting System', 178, 11) +
  menuItem(4, tPoint, '/financial_system.html', 'financialsystem', 'Financial System', 93, 11) +
  menuItem(5, tPoint, '/alt_payment.html', 'alternativepaymentsystem', 'Alternative Payment System', 166, 11)
);
}
document.write(
menuItem(5, tMenu, '/contacts.html', 'contactus', 'Contact Us', 69, 16) +
'      </table>'+
'    </td>'+
'    <td height="248" class="centerbar" align="left" valign="top"><img src="/img/logo_up.gif" width="9" height="64" border="0" alt="Offshore software development in Russia" class="incell"></td>'
);
}
// end menu

document.write(
'<td colspan="4" height="248" align="right" class="centerbar" valign="top">'+
'<table cellspacing="0" cellpadding="0" border="0" width="100%" height="248">'+
'<tr><td height="1" width="541"><img src="/img/z.gif" width="541" height="1" /></td><td'+(isNS4?' width="50%"':'')+'><img src="/img/z.gif" width="1" height="1" /></td></tr>'+
'<tr><td height="27" colspan="2" align="right"><a class="upline" style="text-align: bottom;" href="http://www.intrice-deutschland.de/"><img src="/img/de.gif" alt="" width="20" height="13" border="0" style="vertical-align: bottom;"><img src="/img/z.gif" alt="" width="8" height="1" border="0">German website</a>&nbsp;&#124;&nbsp;<a class="upline" href="/sitemap.html">Site Map</a>&nbsp;&nbsp;&nbsp;</td></tr>'+
'<tr><td height="1"><img src="/img/z.gif" width="541" height="1" /></td><td><img src="/img/z.gif" width="1" height="1" /></td></tr>'
);

if (haveflash)
document.write(
'<tr><td height="190" valign="top">'+
'<OBJECT class="incell" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+
' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"'+
' WIDTH=541 HEIGHT=190>'+
' <PARAM NAME=menu VALUE=false> <PARAM NAME=movie VALUE="/img/flash/'+pageFlash+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#8CB2CF> '+
'<EMBED class="incell" src="/img/flash/'+pageFlash+'" WIDTH=541 HEIGHT=190 menu=false quality=high bgcolor=#8CB2CF TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>'+
'</OBJECT></td>'
);
else 
document.write(
'<tr><td height="190" valign="top" class="centerbarbg"><img src="/img/'+pageFlashBG+'.jpg" width="541" height="190" alt="Offshore software development in Russia"></td>'
);

document.write(
'<td background="/img/'+pageFlashBG+'_.jpg" class="centerbarbg"><img src="/img/z.gif" width="1" height="190" alt="" class="incell"></td>'+
'</tr><tr>'+
'<td colspan="2">'+
'<table cellspacing="0" cellpadding="2" border="0" height="29">'+
'<tr><td>'+subNav+'</td></tr></table>'+
'</td></tr></table>'+
'</td></tr>'+
'<tr height="1"><td class="divline" height="1" colspan="7"><img src="/img/z.gif" width="1" height="1" class="incell" alt=""></td></tr>'
);
