var ResimCache = ["/images/dropdown_fills.png"];
ResimCache[1] = "/images/dropdown_os.png";
ResimCache[2] = "/images/dropdown_us.png";
ResimCache[3] = "/images/menubar_sols.png";
ResimCache[4] = "/images/menubar_sags.png";
ResimCache[5] = "/images/menubar_fills.png";
ResimCache[6] = "/images/boxing_sols.png";
ResimCache[7] = "/images/boxing_sags.png";
ResimCache[8] = "/images/boxing_fills.png";
ResimCache[9] = "/images/banner_infoblox.png";
ResimCache[10] = "/images/banner_hyperip.png";
ResimCache[11] = "/images/banner_vsharp_001.png";
ResimCache[12] = "/images/banner_zimbra.png";
ResimCache[13] = "/images/banner_vmwareview_001.png";
ResimCache[14] = "/images/banner_allot_001.png";
ResimCache[15] = "/images/banner_riverbed_001.png";

window.banner = 9;
window.bannermax = ResimCache.length;


function bannerrotate() {
	var bannertext = "url('" + ResimCache[window.banner] + "')";
	var rottime = 5000;
	document.getElementById("anabanner").style.backgroundImage = bannertext;
	window.banner++;
	if (window.banner >= window.bannermax) {
		window.banner = 9;
	}
	
	window.setTimeout("bannerrotate()",rottime);
}

function ResimYukle() {
	var i = 0;
	for (i = 0; i < ResimCache.length; i++) {
		var Resim = new Image();
		Resim.src = ResimCache[i];
	}
}

function dropdown(e,id,what,drop) {
	var which = id + "_drop";
	var why = "menubar_" + id; 
	if (what === "show") {
			if (drop === "drop") {
				document.getElementById(which).style.display = "block";
			}
			document.getElementById(why).style.backgroundImage = "url('images/menubar_fillsB.png')";
			document.getElementById(why).style.color = "#F5F5F5";
			if (id === "anasayfa") {
				document.getElementById('menubar_sol').style.backgroundImage = "url('images/menubar_solsB.png')"; 
				}
			else if (id === "iletisim") {
				document.getElementById('menubar_sag').style.backgroundImage = "url('images/menubar_sagsB.png')";
			}
	} else {
		if (drop === "drop") {
			var xox = e.relatedTarget || e.toElement;
			var xoxo = xox.id;
			if (xoxo.search(/_drop/) === -1) {
				document.getElementById(which).style.display = "none";
			}
		}
		document.getElementById(why).style.backgroundImage = "url('images/menubar_fillB.png')";
		document.getElementById(why).style.color = "#606060";
		if (id === "anasayfa") {
			document.getElementById('menubar_sol').style.backgroundImage = "url('images/menubar_solB.png')";
		}
		else if (id === "iletisim") {
			document.getElementById('menubar_sag').style.backgroundImage = "url('images/menubar_sagB.png')";	
		}
	}
}

function menudrop_urun(e,topic,id,what) {
	var which = topic + "_drop_" + id;
	var why = topic + "_drop";
	var whicho = "";
	var Urun = ["Ekim Engin"];
	Urun[1] = "vmware";
	Urun[2] = "riverbed";
	Urun[3] = "allot";
	Urun[4] = "vizioncore";
	Urun[5] = "zeus";
	Urun[6] = "veeam";
	Urun[7] = "uptime";
	Urun[8] = "vandyke";
	Urun[9] = "foxit";	
	Urun[10] = "zimbra";
	Urun[11] = "vsharp";
	Urun[12] = "infoblox";
	Urun[13] = "hyperip";
		
		
	if (what === "show") {
		document.getElementById(which).style.backgroundImage = "url('images/dropdown_" + Urun[id] + "s.png')";
		if (id === "1") {
			whicho = topic + "_drop_o";
			document.getElementById(whicho).style.backgroundImage = "url('images/dropdown_os.png')";
		}
		else if (id === "9") {
			whicho = topic + "_drop_u";
			document.getElementById(whicho).style.backgroundImage = "url('images/dropdown_us.png')";
		}
	} else {
		var xox = e.relatedTarget || e.toElement;
		var xoxo = xox.id;
		if (xoxo.search(/_drop/) === -1) {
			document.getElementById(why).style.display = "none";
		}
		document.getElementById(which).style.backgroundImage = "url('images/dropdown_" + Urun[id] + ".png')";
		if (id === "1") {
			whicho = topic + "_drop_o";
			document.getElementById(whicho).style.backgroundImage = "url('images/dropdown_o.png')";
		}
		else if (id === "9") {			
			whicho = topic + "_drop_u";
			document.getElementById(whicho).style.backgroundImage = "url('images/dropdown_u.png')";
		}
	}
}
function menudrop(e,topic,id,what) {
	var which = topic + "_drop_" + id;
	var why = topic + "_drop";
	var whicho = "";
	
	if (what === "show") {
		document.getElementById(which).style.backgroundImage = "url('images/dropdown_fills.png')";
		if (id === "1") {
			whicho = topic + "_drop_o";
			document.getElementById(whicho).style.backgroundImage = "url('images/dropdown_os.png')";
		}
		else if (id === "max") {
			whicho = topic + "_drop_u";
			document.getElementById(whicho).style.backgroundImage = "url('images/dropdown_us.png')";
		}
	} else {
		var xox = e.relatedTarget || e.toElement;
		var xoxo = xox.id;
		if (xoxo.search(/_drop/) === -1) {
			document.getElementById(why).style.display = "none";
		}
		document.getElementById(which).style.backgroundImage = "url('images/dropdown_fill.png')";
		if (id === "1") {
			whicho = topic + "_drop_o";
			document.getElementById(whicho).style.backgroundImage = "url('images/dropdown_o.png')";
		}
		else if (id === "max") {			
			whicho = topic + "_drop_u";
			document.getElementById(whicho).style.backgroundImage = "url('images/dropdown_u.png')";
		}
	}
}

function boxing(id) {
	var which = "boxing_" + id;
	var why = "boxing_text_" + id;
	document.getElementById('boxing_sol').style.backgroundImage = "url('images/boxing_sol.png')";
	document.getElementById('boxing_sag').style.backgroundImage = "url('images/boxing_sag.png')";
	document.getElementById('boxing_duyurular').style.backgroundImage = "url('images/boxing_fill.png')";
	document.getElementById('boxing_musteriyorum').style.backgroundImage = "url('images/boxing_fill.png')";
	document.getElementById('boxing_ilgililink').style.backgroundImage = "url('images/boxing_fill.png')";
	document.getElementById('boxing_duyurular').style.color = "#F5F5F5";
	document.getElementById('boxing_musteriyorum').style.color = "#F5F5F5";
	document.getElementById('boxing_ilgililink').style.color = "#F5F5F5";
	document.getElementById(which).style.backgroundImage = "url('images/boxing_fills.png')";
	document.getElementById(which).style.color = "#606060";
	if (id === "duyurular") {
		document.getElementById('boxing_sol').style.backgroundImage = "url('images/boxing_sols.png')";
	}
	else if (id === "ilgililink") {
		document.getElementById('boxing_sag').style.backgroundImage = "url('images/boxing_sags.png')";
	}
	document.getElementById('boxing_text_duyurular').style.visibility = "hidden";
	document.getElementById('boxing_text_musteriyorum').style.visibility = "hidden";
	document.getElementById('boxing_text_ilgililink').style.visibility = "hidden";
	document.getElementById(why).style.visibility = "visible";
}

function urunmenu(id) {
	var which = "urunler_menubar_" + id;
	var why = "urunler_text_" +id;
	document.getElementById('urunler_menubar_sol').style.backgroundImage = "url('images/menubar_sol.png')";
	document.getElementById('urunler_menubar_sag').style.backgroundImage = "url('images/menubar_sag.png')";
	document.getElementById('urunler_menubar_vmware').style.backgroundImage = "url('images/menubar_fill.png')";
	document.getElementById('urunler_menubar_riverbed').style.backgroundImage = "url('images/menubar_fill.png')";
	document.getElementById('urunler_menubar_allot').style.backgroundImage = "url('images/menubar_fill.png')";
	document.getElementById('urunler_menubar_vizioncore').style.backgroundImage = "url('images/menubar_fill.png')";
	document.getElementById('urunler_menubar_zeus').style.backgroundImage = "url('images/menubar_fill.png')";
	document.getElementById('urunler_menubar_veeam').style.backgroundImage = "url('images/menubar_fill.png')";
	document.getElementById('urunler_menubar_uptime').style.backgroundImage = "url('images/menubar_fill.png')";
	document.getElementById('urunler_menubar_vandyke').style.backgroundImage = "url('images/menubar_fill.png')";
	document.getElementById('urunler_menubar_foxit').style.backgroundImage = "url('images/menubar_fill.png')";
	document.getElementById('urunler_menubar_zimbra').style.backgroundImage = "url('images/menubar_fill.png')";
	document.getElementById('urunler_menubar_vsharp').style.backgroundImage = "url('images/menubar_fill.png')";
	if (id === "vmware") {
		document.getElementById('urunler_menubar_sol').style.backgroundImage = "url('images/menubar_sols.png')";
	}
	else if (id === "foxit") {
		document.getElementById('urunler_menubar_sag').style.backgroundImage = "url('images/menubar_sags.png')";
	}
	if(id === "zimbra"){
		document.getElementById('urunler_menubar_sag_alt').style.backgroundImage = "url('images/menubar_sags.png')";
			document.getElementById('urunler_menubar_sol_alt').style.backgroundImage = "url('images/menubar_sols.png')";
		}
	document.getElementById(which).style.backgroundImage = "url('images/menubar_fills.png')";
	document.getElementById('urunler_text_vmware').style.display = "none";
	document.getElementById('urunler_text_riverbed').style.display = "none";
	document.getElementById('urunler_text_allot').style.display = "none";
	document.getElementById('urunler_text_vizioncore').style.display = "none";
	document.getElementById('urunler_text_zeus').style.display = "none";
	document.getElementById('urunler_text_veeam').style.display = "none";
	document.getElementById('urunler_text_uptime').style.display = "none";
	document.getElementById('urunler_text_vandyke').style.display = "none";
	document.getElementById('urunler_text_foxit').style.display = "none";
	document.getElementById('urunler_text_zimbra').style.display = "none";
	document.getElementById(why).style.display = "block";
}

function videoplay(num, id) {
	var nameit = "player" + num;
	var showcase = "playerdiv" + num;
	document.getElementById("playerdiv0").style.display = "none";
	document.getElementById("playerdiv1").style.display = "none";
	document.getElementById("playerdiv2").style.display = "none";
	document.getElementById("playerdiv3").style.display = "none";
	document.getElementById("playerdiv4").style.display = "none";
	document.getElementById(showcase).style.display = "block";
	if (id === "1") {
		flowplayer(nameit, "flowplayer-3.2.3.swf", { clip: { autoPlay: false, autoBuffering: true}});
	} else {
		flowplayer(nameit, "flowplayer-3.2.3.swf", { clip: { autoPlay: true, autoBuffering: true}});
	}
}
