function swapImgRestore() {
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); return x;
}

function swapImage() {
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function OpenLinkWindow(WinWidth,WinHeight,Link,WindowName) {
	window.open(Link,WindowName,'toolbar=0,width='+WinWidth+',height='+WinHeight+',location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,copyhistory=0');
	return false;
}

function newWindow(mypage, xwidth, xheight) {
	var winx = (screen.width - xwidth) / 2;
	var winy = (screen.height - xheight) / 2;
	winprops = 'height=' + xheight + ',width=' + xwidth + ',top=' + winy + ',left=' + winx + 'status=no,scrollbars=no,resizable=no'
	win = window.open(mypage, 'popup', winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function openWin(url,oW_width,oW_height,oW_menubar,oW_toolbar,oW_location,oW_status,oW_scrollbars,oW_resizable) {
	values = 'width=' + oW_width + ',height=' + oW_height + ',menubar=' + oW_menubar + ',toolbar=' + oW_toolbar + ',location=' + oW_location + ',status=' + oW_status + ',scrollbars=' + oW_scrollbars + ',resizable=' + oW_resizable;
	// alert(values); // Use alert method to test your values
	popup = window.open(url,'popup',values);
	popup.focus();	
}

function loadFlash(){
	var MM_contentVersion = 4;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i){
			if (isNaN(parseInt(words[i])))
			continue;
			var MM_PluginVersion = words[i]; 
	    }
		var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	  && (navigator.appVersion.indexOf("Win") != -1)) {
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
		document.write('on error resume next \n');
		document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
		document.write('</SCR' + 'IPT\> \n');
	}
	if ( MM_FlashCanPlay ) {
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ID="erdogu" WIDTH="770" HEIGHT="193" ALIGN="">');
		document.write('<PARAM NAME=movie wmode="transparent" VALUE="images/introschrift.swf"><param name="wmode" value="transparent" /><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#4A2000>'); 
		document.write('<EMBED src="images/introschrift.swf" quality=high bgcolor=#4A2000 swLiveConnect=FALSE WIDTH="770" HEIGHT="193" NAME="erdogu" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
		document.write('</EMBED>');
		document.write('</OBJECT>');
	} else {
		document.write('<img src="images/start/bg_head.gif" width="772" height="194" alt="" border="0" usemap="#start">');
		document.write('<map name="start"><area alt="" coords="37,13,105,153" href="/"></map>');
	}
}
