//********************************************
function stoperror(){
return true
}
window.onerror=stoperror

//********************************************
_editor_url = "";                     // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
  document.write('<scr' + 'ipt src="' +_editor_url+ 'editor/editor.js"');
  document.write(' language="Javascript1.2"></scr' + 'ipt>');  
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }


function showmenu(elmnt)
{
document.getElementById(elmnt).style.visibility="visible";
document.getElementById(''+elmnt+'').style.display = 'block';
}
function hidemenu(elmnt)
{
document.getElementById(elmnt).style.visibility="hidden";
document.getElementById(''+elmnt+'').style.display = 'none';
}

//****************SOLDA POP************************
//<A href="javascript:Pop('urunmesaj.asp?gorev=mesaj&neresi=oto&id=id&sid=sid','450','400')">Mesaj Gönder</a>
//<A href="javascript:;" onclick="javascript:Pop('urunmesaj.asp?gorev=mesaj&neresi=oto&id=id&sid=sid','450','400')">Mesaj Gönder</a>
function Pop(filename, w, h){ 
popup = window.open(filename,"popDialog","height="+h+",width="+w+",leftmargin=0 ,marginwidth=0, topmargin=0 ,marginheight=0,location=0,resizable=1,toolbar=0,scrollbars=1,status=0,fullscreen=0,alwaysRaised=no,screenX=20,screenY=5,z-lock=yes,left=20,top=20") 
if ( popup.document.close() ) { 
popup.document.close() 
} } 

//***************ORTADA POP***********************
//<A href="javascript:popWindow('urunmesaj.asp?gorev=mesaj&neresi=oto&id=id&sid=sid','450','400','mesaj')">Mesaj Gönder</a>
//<A href="javascript:;" onclick="javascript:popWindow('urunmesaj.asp?gorev=mesaj&neresi=oto&id=id&sid=sid','450','400','mesaj')">Yorum Ekle</A>
function popWindow( url, width, height, windowName )
{
	//get center coords
	var left = (screen.width - width) / 2;
    var top = (screen.height - height) / 2;
    win=window.open(url, windowName, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);
}

//****************SOLDA POP************************
//<A href="javascript:;" onclick="javascript:aypop('tasarim_upload.asp?flds=background','500','250','resim')">aaa</a>
function epop(url, w, h, p){ 
popup=window.open(url,p,'width='+w+',height='+h+',resizable=0,toolbar=no,scrollbars=yes,status=no,left=20,top=20') 
} 










//********************************************
//<A href="javascript:;" onclick="mesajyaz(id,'oto')">Yorum Ekle</A>
function mesajyaz(id,neresi){
window.open("urunmesaj.asp?gorev=mesaj&sid=<%=session.sessionID%>&id=" + id + "&neresi=" + neresi , "pano", "toolbar=no,location=no,directories=no, status=no, menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=450, height=400") 
}

//********************************************
//<A href="javascript:;" onclick="tavsiyeyaz(id,'oto')">Tavsiye Ekle</A>
function tavsiyeyaz(id,neresi){
window.open("urunmesaj.asp?gorev=tavsiye&sid=<%=session.sessionID%>&id=" + id + "&neresi=" + neresi , "pano", "toolbar=no,location=no,directories=no, status=no, menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=450, height=400") 
}

//********************************************
function toggle(theElem){
document.getElementById(theElem).style.display = (document.getElementById(theElem).style.display == 'none')?'':'none';
}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//********************************************
<!-- 
function testPassword(password)
{
	var score   = 0
	var strVerdict = 0
	var step = 0;

	var len = password.length;
	
		// Password Length
			if(len < 5)
				score += 4;
			else if(len > 4 && len < 8)
				score += 8;
			else if(len > 7 && len < 16)
				score += 12;
			else if(len > 15)
				score += 18;
				
		// Letters
			if(password.match(/[a-z]/))
				score += 1;
			
			if(password.match(/[A-Z]/))
				score += 5;
				
		// Numbers
			if(password.match(/\d+/))
				score += 5;
			
			if(password.match(/(.*[0-9].*[0-9].*[0-9])/))
				score += 7;
				
		// Special Char - not applicable for blogcu
			if(password.match(/.[!,@,#,$,%,^,&,*,?,_,~]/))
				score += 5;
			
			if(password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/))
				score += 5;
				
		// Combos
			if(password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/))
				score += 4;
			
			if(password.match(/([a-zA-Z])/) && password.match(/([0-9])/))
				score += 4;
				
			if(password.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/))
				score += 2;
					
	if(score <= 3) {
		step = 0;
	} else if((score < 16) || score > 15 && score < 25) {
		step = 1;
	} else if(score > 24 && score < 35) {
		step = 2;
	} else if((score > 34 && score < 45) || score > 44) {
		step = 3;
	}

	switch(step){
		case 0 :
		case 1 :
			document.getElementById('level_1').className = 'easy';
			document.getElementById('level_2').className = '';
			document.getElementById('level_3').className = '';
			break;
		case 2 :
			document.getElementById('level_1').className = 'medium';
			document.getElementById('level_2').className = 'medium';
			document.getElementById('level_3').className = '';
			break;
		case 3 :
			document.getElementById('level_1').className = 'difficult';
			document.getElementById('level_2').className = 'difficult';
			document.getElementById('level_3').className = 'difficult';
			break;
		default :
			document.getElementById('level_1').className = '';
			document.getElementById('level_2').className = '';
			document.getElementById('level_3').className = '';
			break;
	}
	
}
// End-->

//********************************************
//<a href="javascript:;" onclick="javascript:fontsize(20,'secilialan');">Büyült</a>
function fontsize(size,neresi){
dvRightTxt = document.getElementById(neresi);
dvRightTxt.style.fontSize=size+"px";}

//********************************************
//<a href="javascript:;" onclick="javascript:yazdir('secilialan');">Sayfayı Yazdır</a> 
function yazdir(neresi){
dvRightTxt = document.getElementById(neresi);
html = '<html><head><title>Ön izleme</title><style type=text/css>body{backgorund:#FFFFFF;}</style></head><body>'+dvRightTxt.innerHTML +'</body></html>';
printW = window.open('','','width=1000,height=600,scrollbars=yes,left=10,top=10');
printW.document.open();
printW.document.write(html);
printW.document.close();
printW.print();
printW.close();}

//********************************************
//<a href="javascript:;" onclick="javascript:kaydet('secilialan');">Kaydet</a> 
function kaydet(neresi){
dvRightTxt = document.getElementById(neresi);
html = '<html><head><title>Ön izleme</title><style type=text/css>body {backgorund:#FFFFFF;}</style></head><body>'+dvRightTxt.innerHTML +'</body></html>';
printW = window.open('','','width=800,height=600,scrollbars=yes,left=20,top=20');
printW.document.open();
printW.document.write(html);
printW.document.close();
printW.document.execCommand('SaveAs');
printW.close();}

//********************************************
//<a href="javascript:;" onclick="javascript:favorilerekle();">FavorilereKaydet</a> 
function favorilerekle(){
title = document.title;
url = document.URL;
    if (window.sidebar) { 
        window.sidebar.addPanel(title, url,""); 
    } else if( document.all ) {
        window.external.AddFavorite( url, title);
    } else if( window.opera && window.print ) {
        return true;}}


//********************************************
//<a href="javascript:;" onclick="javascript:popImage('a.jpg','Foto');">Resim Aç</a> 
// Script Source: CodeLifter.com
			// Copyright 2003
			// Do not remove this notice.
			// SETUPS:
			// ===============================
			// Set the horizontal and vertical position for the popup
			PositionX = 50;
			PositionY = 50;
			// Set these value approximately 20 pixels greater than the
			// size of the largest image to be used (needed for Netscape)
			defaultWidth  = 500;
			defaultHeight = 500;
			// Set autoclose true to have the window close automatically
			// Set autoclose false to allow multiple popup windows
			var AutoClose = true;
			// Do not edit below this line...
			// ================================
			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=none,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
			var optIE='scrollbars=none,width=100,height=100,left='+PositionX+',top='+PositionY;

			function popImage(imageURL,imageTitle)
			{
				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(100,100);');
				writeln('width=(document.images[0].width)+30;');
				writeln('height=(document.images[0].height)+40;');
				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=FFFFFF scroll="auto" onload="reSizeToImage();doTitle();self.focus()">')
				else writeln('</head><body bgcolor=FFFFFF scroll="auto" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
				writeln('<img align=absmiddle name="George" src="'+imageURL+'" style="display:block"></body></html>');
				close();		
				}
			}
