var bd;
var bflag = ""
bd = new browserdata_clientside();
if(bd.UL){document.write ("<LINK REL=STYLESHEET TYPE=\"text/css\" HREF=\"/includes/style_ie.css\">");bflag="ie";}	
else if(bd.nav4){document.write ("<LINK REL=STYLESHEET TYPE=\"text\/css\" HREF=\"\/includes\/style_n.css\">");bflag="ns";}
else{document.write ("<LINK REL=STYLESHEET TYPE=\"text/css\" HREF=\"/includes/style_ie.css\">");bflag="ie";}

function browserdata_clientside()
{
	var UA = navigator.userAgent;
	if(UA.indexOf("MSIE") != -1){
		this.ie = true;
		var v = UA.charAt(UA.indexOf("MSIE") + 5);
		if(v == 2 ) this.ie2 = true;
		else if(v == 3 ) this.ie3 = true;
		else if(v == 4 ) this.ie4 = true;
		else if(v == 5 ) this.ie5 = true;
		if(this.ie4 || this.ie5) this.UL = true;
	}else if( ( -1 != UA.indexOf("Mozilla") ) && ( -1 != UA.indexOf("compatible") ) ){
		this.nav = true;
		var v = UA.charAt(UA.indexOf("Mozilla") + 8);
		if(v == 2 ) this.nav2 = true;
		else if(v == 3 ) this.nav3 = true;
		else if(v == 4 ) this.nav4 = true;
		else if(v > 4 ) this.nav4 = true;
	}
	else if( -1 != UA.indexOf("Mozilla") ){
		this.nav = true;
		var v = UA.charAt(UA.indexOf("Mozilla") + 8);
		if(v == 2 ) this.nav2 = true;
		else if(v == 3 ) this.nav3 = true;
		else if(v == 4 ) this.nav4 = true;
		else if(v > 4 ) this.nav4 = true;
	}
	if(UA.indexOf("Windows 95") > 0 || UA.indexOf("Win95") != -1 || UA.indexOf("Win98") != -1 || UA.indexOf("Windows 98") != -1 || UA.indexOf("Windows NT") != -1) this.win32 = true;
	else if(UA.indexOf("Windows 3.1") != -1 || UA.indexOf("Win16") != -1) this.win16 = true;
	else if(UA.indexOf("Mac") != -1) this.anymac = true;
	else if(UA.indexOf("SunOS") != -1 || UA.indexOf("HP-UX") != -1 || UA.indexOf("X11") != -1) this.unix = true;
	else if(UA.indexOf("Windows CE") != -1) this.wince = true;
}

function valid_email()
{
	var input_val = arguments[0];
	if( "string" != typeof input_val ){ return false; }
	var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
	var regex = new RegExp(emailReg);
	return regex.test(input_val);
}

	function OpenJSWin(JsWinW,JsWinH,JsWinS){
		var NewJSWindow
		NewJSWindow = window.open(JsWinS,null,"width="+JsWinW+",height="+JsWinH+",status=no,toolbar=no,menubar=no,location=no")
		if(NewJSWindow){
			var MidX = Math.round((window.screen.availWidth-JsWinW)/2)
			var MidY = Math.round((window.screen.availHeight-JsWinH)/2)
			NewJSWindow.moveTo(MidX,MidY);
			NewJSWindow.focus();}
		}

					function checkForms(formName){
	var FormObj = eval("document."+formName);
		for(i=0;i<FormObj.elements.length;i++){
				if(FormObj.elements[i].value.length==0){alert("Alan boş kalamaz !...");FormObj.elements[i].focus();return false;};
		}
}

	function calc(pageId){
	document.images.titlePic.src = Resimler[pageId].src;
	if(pageId!=0){
	parent.bottom.location.href="page"+pageId+".asp";
	}
}

	function elPRinTO(){
	if(bd.nav4)
		{alert(document.layers.kunu);}	
	;
	alert(document.all.kunu);
}


	function send2(){
	URL_VAL = window.location.href;
	window.location.href = "mailto:?subject=Asaf Savaş Akat Yazıları&body="+URL_VAL;
}


	function printPA(){
	try {
		reg = /books/;
		document.all.small.width = 10;
		document.all.big.align = "left";
		document.all.big.width = 600;
		if(!reg.test(document.referrer)){
		document.all.comboarea.style.display = "none";
		document.all.formarea.style.display = "none";
		}

	}
	
	catch(e){
	}
	
	window.print();
}

	function reBuild(){
	try {

		document.all.small.width = 102;
		document.all.big.align = "right";
		document.all.big.width = 658;
		if(!reg.test(document.referrer)){
		document.all.comboarea.style.display = "block";
		document.all.formarea.style.display = "block";
		}


	}
	
	catch(e){
	}
	

}