	
	// Tarayicilar
	var UA = navigator.userAgent.toLowerCase();
	var OP = ( UA.indexOf('opera')   != -1);
	var FF = ( UA.indexOf('firefox') != -1);
	var IE = ((UA.indexOf('msie')    != -1) && (!OP) && (!FF));		
		
	var browser = navigator.appName;
	var b_version = navigator.appVersion;
	var version = parseFloat(b_version);

	function getCookie(c_name){
		if (document.cookie.length>0){
			c_start=document.cookie.indexOf(c_name + "=")
			if (c_start!=-1){ 
				c_start=c_start + c_name.length+1 
				c_end=document.cookie.indexOf(";",c_start)
				if (c_end==-1) c_end=document.cookie.length
				return unescape(document.cookie.substring(c_start,c_end))
			} 
		}
		return "";
	}




	/**
	 * @comment  : Tepede bulunan reklam goruntusunu acar ve kapatir.
	 * @function : openCloseAdvertising
	 * @param    : value( INT acik = 1, kapali = 0 )
	 * @return   : void
	 */
	function openCloseAdvertising(img){
		
		var screen_width = window.screen.width;
		
		if ( screen_width > 1024 ){
			var htmlhtml = window.document.getElementById('htmlhtml');
			htmlhtml.style.background = 'url('+img+') no-repeat fixed center top';
		}

	}
	//function(openCloseAdvertising):END

	function onForm(){
	
		// Sayfanin yuksekligini ayarla
		var tbH = document.documentElement.clientHeight;
		var tableHeight = document.getElementById('tableHeight');
		tableHeight.style.height = (tbH-230)+'px';
		
		// Formdaki text alanlarinin style'lerini belirt.
		var input_tag = document.getElementsByTagName('input');
		var textarea_tag = document.getElementsByTagName('textarea');
		
		var input_length = input_tag.length;
		var textarea_length = textarea_tag.length;
		
		for ( i = 0 ; i < input_length ; i++ ){
			if ( input_tag[i].type == 'text' || input_tag[i].type == 'password' || input_tag[i].type == 'file' ){
				input_tag[i].className = 'input';

				if ( !input_tag[i].onfocus ){
					input_tag[i].onfocus = function(){
						this.className += ' input_focus';
					}
					input_tag[i].onblur = function(){
						this.className = 'input';
					}
				}
			} 
		}
		
		for ( i = 0 ; i < textarea_length ; i++ ){
			if ( !textarea_tag[i].onfocus ){
				textarea_tag[i].onfocus = function(){
					this.className += ' input_focus';
				}
			}
			
			textarea_tag[i].onblur = function(){
				this.className = '';
			}
		}
		
	}

	function infoIcon(e,str){
	
		if (!e) e = window.event;

		if (e){
		  if (e.pageX || e.pageY){
		  	screen_x = window.innerWidth - 16;
		  	screen_y = window.innerHeight - 16;
		    mousex = e.pageX + 15;
		    mousey = e.pageY;
		  }
		  else if (e.clientX || e.clientY){
		  	screen_x = document.body.offsetWidth - 20;
		  	screen_y = document.body.offsetHeight - 20;
		    mousex = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft + 15;
		    mousey = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
		  }
		}

		var div_info_icon = document.getElementById('div_info_icon');
		div_info_icon.style.display 	= 'block';
		div_info_icon.style.textAlign	= 'center';
		div_info_icon.innerHTML	= str;

		var div_width = div_info_icon.style.width;
		var div_height = div_info_icon.offsetHeight;
		div_width = 180;

		//alert(screen_y+' - '+mousey+' - '+div_height);
		if ( screen_x - mousex  < div_width ){			
			mousex = (mousex - div_width - 25);
			mousey = mousey + 15;
		}
		if ( screen_y - mousey  < div_height ){
			mousey = (mousey - div_height - 15);
		}

		div_info_icon.style.left 		= mousex+'px';
		div_info_icon.style.top 		= mousey+'px';
		return false;

	}

	function infoIconClose(){
		var div_info_icon 					= document.getElementById('div_info_icon');		
		div_info_icon.innerHTML			= '';
		div_info_icon.style.display = 'none';
		return false;
	}
	
	
	/**
	 * @comment  	: Resim icin pop-up acar. Olculeri otomatik ayarlar.
	 * @function 	: popImage
	 * @param    		: imageURL(resmin yolu), imageTitle(Resim icin alt tag metni)
	 * @example       : popImage('http://SomeSite.com/SomeImage.gif','Some Title')
	 * @return   		: document
	 */
	function popImage(imageURL, imageTitle){
		
		PositionX = 100;
		PositionY = 100;
		defaultWidth  = 500;
		defaultHeight = 500;
		
		var AutoClose = true;
		
		// -------------------------------------------------
		if (parseInt(navigator.appVersion.charAt(0))>=4){
			var isNN=(navigator.appName=="Netscape")?1:0;
			var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
		}

		var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
		var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
		var aa;
		
		if (isNN){imgWin=window.open('about:blank','',optNN);}
		if (isIE){imgWin=window.open('about:blank','',optIE);}
		with (imgWin.document){
			writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
			writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
			writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
			writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(300,300);');
			writeln('width=300-(document.body.clientWidth-document.images[0].width);');
			writeln('height=300-(document.body.clientHeight-document.images[0].height);');
			writeln('window.resizeTo(width,height);}');writeln('if (isNN){');
			writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
			writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
			if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
			else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus();document.getElementById(\'div_loading\').style.display = \'none\';" onblur="self.close()">');
			writeln('<table cellpadding="0" width="100%" height="" cellspacing="0" border="0" align="center">');
			writeln('<tr>');
			writeln('<td valign="top"');
			writeln('    onClick="window.close();"');
			writeln('    style="cursor:pointer;">');
			writeln('<img name="George" src='+imageURL+' style="display:block" onClick="window.close();" style="cursor:pointer;">');
			writeln('<div id="div_loading"');
			writeln('     style="display:inline;position:absolute;background-color:#666;color:#ffffff;font-family:Verdana;font-size:10px;');
			writeln('     border:1px solid #efefef;padding:3px;height:13px;width:70px;top:10px;left:10px;">Yükleniyor...</div>');
			writeln('</td></tr>');
			writeln('</table></body></html>');
			close();
		}
	}
