function mailTo(m,cl,e) {
	
if (!e) {
			e='domain_name.com';
		}

document.write('<a href=mailto:'+m+String.fromCharCode(64)+e+' class="'+cl+'">'+m+String.fromCharCode(64)+e+'</a>');

}


function BrowserDetect(){
var ua=navigator.userAgent.toLowerCase(); 
	this.isGecko=(ua.indexOf('gecko')!=-1 && ua.indexOf('safari')==-1);
	this.isAppleWebKit=(ua.indexOf('applewebkit')!=-1);

	this.isSafari=(ua.indexOf('safari')!=- 1);
	this.isIE=(ua.indexOf('msie')!=-1 && !this.isOpera && (ua.indexOf('webtv')==-1)); 
	this.isMozilla=(this.isGecko && ua.indexOf('gecko/')+14==ua.length);
	this.isFirebird=(ua.indexOf('firebird/')!=-1);
	this.isNS=((this.isGecko)?(ua.indexOf('netscape')!=-1):((ua.indexOf('mozilla')!=-1) && !this.isOpera && !this.isSafari && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible')==-1) && (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1)));

	this.isIECompatible=((ua.indexOf('msie')!=-1) && !this.isIE);

	this.geckoVersion=((this.isGecko)?ua.substring((ua.lastIndexOf('gecko/')+6), (ua.lastIndexOf('gecko/')+14)):-1);
	this.equivalentMozilla=((this.isGecko)?parseFloat(ua.substring(ua.indexOf('rv:')+3)):-1);
	this.appleWebKitVersion=((this.isAppleWebKit) ? parseFloat(ua.substring(ua.indexOf('applewebkit/')+12)):-1);

	this.versionMinor=parseFloat(navigator.appVersion); 

	if(this.isGecko && !this.isMozilla) this.versionMinor=parseFloat(ua.substring(ua.indexOf('/', ua.indexOf('gecko/')+6)+1));
	else if(this.isMozilla) this.versionMinor=parseFloat(ua.substring(ua.indexOf('rv:')+3));
	else if(this.isIE && this.versionMinor>=4) this.versionMinor=parseFloat(ua.substring(ua.indexOf('msie ')+5));
	else if(this.isSafari) this.versionMinor=parseFloat(ua.substring(ua.lastIndexOf('safari/')+7));

	this.versionMajor=parseInt(this.versionMinor); 

	this.isDOM1=(document.getElementById);
	this.isDOM2Event=(document.addEventListener && document.removeEventListener);

	this.mode=document.compatMode?document.compatMode:'BackCompat';

	this.isWin=(ua.indexOf('win')!=-1);
	this.isMac=(ua.indexOf('mac')!=-1);

	this.isNS6x=(this.isNS && this.versionMajor==6);
	this.isNS6up=(this.isNS && this.versionMajor>= 6);
	this.isNS7x=(this.isNS && this.versionMajor==7);
	this.isNS7up=(this.isNS && this.versionMajor>= 7);
	this.isIE5x=(this.isIE && this.versionMajor==5);
	this.isIE55=(this.isIE && this.versionMinor==5.5);
	this.isIE5up=(this.isIE && this.versionMajor>= 5);
	this.isIE6x=(this.isIE && this.versionMajor==6);
	this.isIE6up=(this.isIE && this.versionMajor>= 6);
}
var browser=new BrowserDetect();

function Browser() {
	var b=navigator.appName;
	if (b=="Netscape") this.b="ns";
	else if ((b=="Opera") || (navigator.userAgent.indexOf("Opera")>0)) this.b = "opera";
	else if (b=="Microsoft Internet Explorer") this.b="ie";
	if (!b) alert('Unidentified browser./nThis browser is not supported,');
this.version=navigator.appVersion;
this.v=parseInt(this.version);
this.ns=(this.b=="ns" && this.v>=4);
this.ns4=(this.b=="ns" && this.v==4);
this.ns6=(this.b=="ns" && this.v==5);
this.ie=(this.b=="ie" && this.v>=4);
this.ie4=(this.version.indexOf('MSIE 4')>0);
this.ie5=(this.version.indexOf('MSIE 5')>0);
this.ie55=(this.version.indexOf('MSIE 5.5')>0);
this.ie6=(this.version.indexOf('MSIE 6')>0);
this.opera=(this.b=="opera");
this.dom=(document.createElement && document.appendChild && document.getElementsByTagName)?true:false;
this.def=(this.ie||this.dom); // most used browsers, for faster if loops
var ua=navigator.userAgent.toLowerCase();
if (ua.indexOf("win")>-1) this.platform="win32";
else if (ua.indexOf("mac")>-1) this.platform="mac";
else this.platform="other";
}
is = new Browser();
	
	
	
function preloader(imgArray) {
var me=new Array();
for(i=0;i<=imgArray.length-1;i++) {
	me[i]=new Image();
	me[i].src='i/mn/'+imgArray[i];
}
}

function mout(I) {
if (I!=2) {
document.images['m'+I].src='i/mn/menu'+I+'_out.gif';
} else {
document.images['m'+I].src='i/mn/menu'+I+'_act.gif';
}
}

function movr(I) {

document.images['m'+I].src='i/mn/menu'+I+'_ovr.gif';
}
imgA='m1_ovr.jpg,m2_ovr.jpg,m3_ovr.jpg,m4_ovr.jpg,m5_ovr.jpg';
preloader(imgA.split(','));
imgA='m1_out.jpg,m2_act.jpg,m3_out.jpg,m4_out.jpg,m5_out.jpg';
preloader(imgA.split(','));



function changeBGColor(obj,col) {
obj.style.backgroundColor=col;
}
scrollrate=0;
function scrollup() {
scrollStart=document.body.scrollTop;
scrollrate=parseInt(document.body.scrollTop)/5;
if (parseInt(document.body.scrollTop)>scrollrate) {
	window.scroll(0,parseInt(document.body.scrollTop)-scrollrate);
	scrolltimeout=setTimeout('scrollup()',10);
} else {
	window.scroll(0,0);
	scrollrate=0;
}
}

function MagiCScroller(nm) {
	this.NewsArray=new Array();
	this.name=nm;
	this.Speed=10;
	this.Pause=3;
	this.Width=15;
	this.Height=15;
	this.pos='absolute';
	this.l='0px';
	this.t='0px';
	this.Initiated=false;
	this.newsIndex=0;
	this.stX=0;
}

MagiCScroller.prototype.run=function() {
	
	
	slideLayer(this.name+'Sub1',this.stX,this.name+'Main');
	slideLayer(this.name+'Sub2',this.stX+this.Height,this.name+'Main');
	
	this.stX+=-this.Speed;
	
	if (this.stX<-this.Height) {
		
		this.stX=0;
		this.fN++;
		if (this.fN>this.nL) {
			this.fN=0;
		}
		
		this.sN=this.fN+1;
	
	
		if (this.sN>this.nL) {
			this.sN=0;
		}
		
		writeLayer(this.name+'Sub1',this.name+'Main',this.NewsArray[this.fN]);
		writeLayer(this.name+'Sub2',this.name+'Main',this.NewsArray[this.sN]);
		
		slideLayer(this.name+'Sub1',this.stX,this.name+'Main');
	slideLayer(this.name+'Sub2',this.stX+this.Height,this.name+'Main');
		setTimeout(this.name+'.run()',this.Pause*1000);
	} else {
		setTimeout(this.name+'.run()',100);
	}
	
	
}




MagiCScroller.prototype.init=function() {
	//style'ý yaz...
	t='';
	t+='<style>\n'
	
	t+='#'+this.name+'Main { position:'+this.pos+'; left:'+this.l+'; top:'+this.t+'; overflow:hidden; width:'+this.Width+'px; height:'+this.Height+'px;}\n';
	t+='#'+this.name+'Sub1 { position:absolute; left:0px; top:0px; width:'+this.Width+'px; height:'+this.Height+'px;}\n';
	t+='#'+this.name+'Sub2 { position:absolute; left:0px; top:0px; width:'+this.Width+'px; height:'+this.Height+'px;}\n';
	
	t+='</style>\n';
	
	//layer'larý yaz...
	
	
	document.write(t);
	t='';
	
	
	this.nL=(this.NewsArray).length-1;
	this.newsIndex=0;
	this.fN=0;
	this.sN=this.fN+1;
	if (this.sN>this.nL) {
		this.sN=0;
	}
	
	t+='<div id="'+this.name+'Main">';
	t+='<div id="'+this.name+'Sub1">'+this.NewsArray[this.fN]+'</div>';
	t+='<div id="'+this.name+'Sub2">'+this.NewsArray[this.sN]+'</div>';
	t+='</div>';
	
	document.write(t);
	
	slideLayer(this.name+'Sub1',this.stX,this.name+'Main');
	slideLayer(this.name+'Sub2',this.stX+this.Height,this.name+'Main');
	
	
	setTimeout(this.name+'.run()',this.Pause*1000);
	
}

//dom utilities

function slideLayer(lyr,t,pr) {
	
	if (is.ie) {
		
		document.all[lyr].style.top=t;
	} else if (is.ns6) {
		document.getElementById(lyr).style.top=t+'px';
	} else if (is.ns4) {
		document.layers[pr].document.layers[lyr].top=t;
	}
}

function writeLayer(lyr,pr,cont) {
	if (is.ie) {
		document.all[lyr].innerHTML=cont;
	} else if (is.ns6) {
		document.getElementById(lyr).innerHTML=cont;
	} else if (is.ns4) {
		
		document.layers[pr].document.layers[lyr].document.open();
		document.layers[pr].document.layers[lyr].document.write(cont);
		document.layers[pr].document.layers[lyr].document.close();
	}
}

function sagalt() {
	
	if (is.ns6) {
		if (parseInt(document.body.offsetHeight)>=parseInt(window.innerHeight))
		
			{	
				
				document.getElementById('hometop').style.top=document.body.offsetHeight;
	
			} else {
				
				document.getElementById('hometop').style.top=window.innerHeight;
				
			}
	} else {
		
		//document.body.onload=sagalt2;
		
	}
	document.getElementById('hometop').style.left='580px';
	document.getElementById('hometop').style.visibility='visible';}
	
function sagalt2() {
	if (document.body.scrollHeight>document.body.clientHeight) {
		document.getElementById('hometop').style.top=document.body.scrollHeight-30;
	} else {
		document.getElementById('hometop').style.top=document.body.clientHeight-30;
	}
	
}

function openPopUp(src,w,h) {
		KopWin = window.open(src,"ben","toolbar=0,width=" + w + ",height=" + h + ",location=0,directories=0,status=0,scrollbars=0,menubar=0,resizable=0,copyhistory=1");
		KopWin.focus();
	}
function openPopUp2(src,w,h) {
		KopWin = window.open(src,"ben","toolbar=0,width=" + w + ",height=" + h + ",location=0,directories=0,status=0,scrollbars=1,menubar=0,resizable=0,copyhistory=1");
		KopWin.focus();
	}
	
var flashVersion = 0;
function getFlashVersion() {
	var latestFlashVersion = 25;
	var agent = navigator.userAgent.toLowerCase(); 
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object'){ 
			for (var i = latestFlashVersion; i >= 3; i--){
	            if (flashPlugin.description.indexOf(i + '.') != -1){
	               flashVersion = i;
	               break;
	            }
			}
		}
	}

	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
		var doc = '<scr' + 'ipt language="VBScript"\> \n';
		doc += 'On Error Resume Next \n';
		doc += 'Dim obFlash \n';
		doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
		doc += '	Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
		doc += '	If IsObject(obFlash) Then \n';
		doc += '		flashVersion = i \n';
		doc += '		Exit For \n';
		doc += '	End If \n';
		doc += 'Next \n';
		doc += '</scr' + 'ipt\> \n';
		document.write(doc);
	}
	else{
		flashVersion = flashVersion_DONTKNOW;
	}

return flashVersion;

}
flashVersion_DONTKNOW = -1;

function FlashObject(){
	this.maxVersion;
	this.SwfFile;

	this.minVersion;
	this.altSwfFile;

	this.altImage;
	this.altImageAddAtribute;
	this.altImageHTML;

	this.width;
	this.height;
	this.menu;
	this.background;
}

FlashObject.prototype.rnd=function(){
	this.ranNum= Math.random()*64;
    return this.ranNum;
}

FlashObject.prototype.embed=function(){
	if(getFlashVersion()>=this.maxVersion){
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH='+this.width+' HEIGHT='+this.height+'><PARAM NAME=movie VALUE="'+this.SwfFile+'?'+this.rnd()+'"><PARAM NAME=menu VALUE='+this.menu+'><param name="wmode" value="'+this.wmode+'"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="'+this.background+'">');
		document.write('<EMBED src="'+this.SwfFile+'?'+this.rnd()+'" menu="'+this.menu+'" wmode="'+this.wmode+'" quality="high" bgcolor="'+this.background+'"  WIDTH="'+this.width+'" HEIGHT="'+this.height+'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>');
		document.write('</OBJECT>');
	}
	else if((getFlashVersion()> this.minVersion) && (getFlashVersion()< this.maxVersion) && this.altSwfFile){
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH='+this.width+' HEIGHT='+this.height+'><PARAM NAME=movie VALUE="'+this.altSwfFile+'?'+this.rnd()+'"><PARAM NAME=menu VALUE='+this.menu+'<param name="wmode" value="'+this.wmode+'">><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE='+this.background+'>');
		document.write('<EMBED src="'+this.altSwfFile+'?'+this.rnd()+'" menu="'+this.menu+'" wmode="'+this.wmode+'" quality=high bgcolor='+this.background+'  WIDTH='+this.width+' HEIGHT='+this.height+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>');
		document.write('</OBJECT>');
	}else{
		if(this.altImageAddAtribute){
			document.write('<img src="'+this.altImage+'" width="'+this.width+'" height="'+this.height+'" border="0" '+this.altImageAddAtribute+' />');
			document.write(this.altImageHTML);
		}else{
			document.write('<img src="'+this.altImage+'" width="'+this.width+'" height="'+this.height+'" border="0" />');
		}
	}
}

function mailTo(m,nm,e,cl) {
	
if (!e) { e='kalekalip.com.tr '; }

if (!nm) { nm = m+String.fromCharCode(64)+e; }

   if(!cl) { document.write('<a href=mailto:'+m+String.fromCharCode(64)+e+' style="color:#828282; text-decoration:underline;">'+nm+'</a>'); }
   else    { document.write('<a href=mailto:'+m+String.fromCharCode(64)+e+' class="'+cl+'">'+nm+'</a>'); }

}

function mailTo_img(m,img ,e,cl) {
	
if (!e) { e='kalekalip.com.tr '; }


   if(!cl) { document.write('<a href=mailto:'+m+String.fromCharCode(64)+e+'>'+img+'</a>'); }
   else    { document.write('<a href=mailto:'+m+String.fromCharCode(64)+e+' class="'+cl+'">'+img+'</a>'); }

}