<!--
//****************************************
// Name: Yorumcu-www
// Date: 08-10-2008 - ver: 1.0.1
//****************************************

var disCopy=true;//4copyCop
function brkframe() {try {if (window !=window.top)top.location.href=location.href;}catch(e){}}
function noComplete(fieldid) {if (fieldid !="undefined") fieldid.setAttribute("autocomplete", "off");}
function copyCop(target){
	if (typeof target.onselectstart!="undefined") //IE route
		target.onselectstart=function(){return false}
	else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
		target.style.MozUserSelect="none"
	else //All other route (ie: Opera)
		target.onmousedown=function(){return false}
	target.style.cursor = "default"
}

//var mtTitle='Yorumcu Astroloji - Burçların Buluşma Noktası';
//var myUrl='http://www.yorumcu.com/';
function addBookmark(mtTitle,myUrl) {
    if (window.sidebar) {//FF
        window.sidebar.addPanel(mtTitle,myUrl,"");
    } else if(document.all) {//Ie
        window.external.AddFavorite(myUrl,mtTitle);
    } else if(window.opera && window.print) {//Opera
		var elem = document.createElement('a');
		elem.setAttribute('href',myUrl);
		elem.setAttribute('title',mtTitle);
		elem.setAttribute('rel','sidebar');
		elem.click();
    }
}

// Yorumcu MULTI-TABS v1.0
// Multifunction Login-Search-Register-Help Box
/* Swich Multitabs Functions
--------------------------*/
function multiTab(menuname) {
	var buttonName=menuname.substr(0, 8);
	var buttonNumber=menuname.substr(8, 1);

	if (menuname=='mmLogin') {
		if (document.getElementById) {//DOM3: IE5, NS6
			document.getElementById('searchDiv').style.display='none';
			document.getElementById('loginDiv').style.display='block';
		} else {
			document.getElementById('searchDiv').style.visibility='hidden';
			document.getElementById('loginDiv').style.visibility='visible';
		}
		document.getElementById('loginLink').className='active';
		document.getElementById('searchLink').className='';
	}
	else if (menuname=='mmSearch') {
		if (document.getElementById) {//DOM3: IE5, NS6
			document.getElementById('searchDiv').style.display='block';
			document.getElementById('loginDiv').style.display='none';
		} else {
			document.getElementById('searchDiv').style.visibility='visible';
			document.getElementById('loginDiv').style.visibility='hidden';
		}
		document.getElementById('loginLink').className='';
		document.getElementById('searchLink').className='active';

		var objsfrm=document.getElementById('frmSearch');
		// if frmSearch.action is custom search (mmSearch), then set default checked box as site search.
		if (objsfrm.action='/yardim/arama.asp'&&!(objsfrm.searchRad1.checked)&&!(objsfrm.searchRad2.checked)&&!(objsfrm.searchRad3.checked)&&!(objsfrm.searchRad4.checked)){gvDE(1,false);objsfrm.searchRad1.checked=true;}
		// if page loaded, set frmSearch.q.name & frmSearch.action
		else if ((objsfrm.searchRad1.checked)||(objsfrm.searchRad2.checked)){gvDE(1,false);}
	}
	else if (buttonName=='mcButton') {
		for (i=1; i<=4; i++){
			if (i==buttonNumber) {
				document.getElementById('mcDiv'+i).style.display='block';
				document.getElementById(menuname).className='active';
			} else {
				document.getElementById('mcDiv'+i).style.display='none';
				document.getElementById('mcButton'+i).className='';
			}
		}
	}
}

/* Login in Password Swaps
--------------------------*/
function swapLogin(el,iEvent) {
	if (iEvent=='keypress') {
		if(el.value=='') {
			el.className='showName';
		} else {
			el.className='hideName';
		}
	};

	if (iEvent=='keyup') {
		if(el.value=='') {
			el.className='showName';
		} else {
			el.className='hideName';
		}
	};
}

/* Swich Multitabs Search Functions
--------------------------*/
function gvDE(isel,bvar) {
	var objsfrm=document.getElementById('frmSearch');

	//set all the hidden google input fields on the form
	for(var i=1; i <= 7; i++) {
		document.getElementById('gv'+i).disabled=bvar;
	}

	switch (isel) {
		case 4:
			objsfrm.searchInp.name='q';
			objsfrm.action='/astroloji/yazilar.asp';break
		case 3:
			objsfrm.searchInp.name='nick';
			objsfrm.action='/astrokulup/astropartner.asp';break
		case 1: case 2: default:
			objsfrm.searchInp.name='q';
			objsfrm.action='/yardim/arama.asp';
	}
}

/* login/logout
--------------------------*/
function cLogin(myForm){if (myForm.email.value==""){alert("Lütfen e-posta adresinizi yazın.");myForm.email.focus();return (false);}if (myForm.pw.value==""){alert("Lütfen parolanızı yazın.");myForm.pw.focus();return (false);}}
function set_c(cName,cValue) {document.cookie=cName+"="+cValue+";expires=;path=/";}
function YR_goToURL(url) {window.top.location=url;}

/* show OR hide funtion depends on if element is shown or hidden
--------------------------*/
function shoh(id) { 
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(id).style.display=="none"){
			document.getElementById(id).style.display='block';
		} else {
			document.getElementById(id).style.display='none';
		}	
	} else { 
		if (document.layers) {	
			if (document.id.display=="none"){
				document.id.display='block';
			} else {
				document.id.display='none';
			}
		} else {
			if (document.all.id.style.visibility=="none"){
				document.all.id.style.display='block';
			} else {
				document.all.id.style.display='none';
			}
		}
	}
}

/*--------------------------------------------*/
/* Object placer                              */
/*--------------------------------------------*/
// This function positions the outputObj reference to inputObj's position
function setObjectPosition(inputObj, outputObj, offsetX, offsetY) {
	outputObj.style.left = (getLeftPos(inputObj) + offsetX) + 'px';
	outputObj.style.top = (getTopPos(inputObj) + inputObj.offsetHeight + offsetY) + 'px';
}

// This method will return the top coordinate(pixel) of an object
function getTopPos(inputObj) {
	var returnValue = inputObj.offsetTop;
	while((inputObj = inputObj.offsetParent) != null){
	if(inputObj.tagName!='HTML'){
		returnValue += inputObj.offsetTop;
		if(document.all) returnValue += inputObj.clientTop;
		}
	}
	return parseInt(returnValue);
}

// This method will return the left coordinate(pixel) of an object
function getLeftPos(inputObj) {
	var returnValue = inputObj.offsetLeft;
	while((inputObj = inputObj.offsetParent) != null){
	if(inputObj.tagName!='HTML'){
		returnValue += inputObj.offsetLeft;
		if(document.all) returnValue += inputObj.clientLeft;
		}
	}
	return parseInt(returnValue);
}

/* Copyright
--------------------------*/
function openCR() {
	popup('/cr.asp','Copyright',625,510);
	//var cvar=showModalDialog('/cr.asp', window.dialogArguments, 'dialogWidth:625px; dialogHeight:510px; _dialogHeight:500px; help:0; status:0; resizable:0; scroll:0; center:1');
}

/* po wo scrolls
--------------------------*/
function popup(source, winname, w, h) {
	if (winname=='') {winname=source}
	//winname=winname.replace(/\\/g,"_");
	winname=winname.replace(/([/.-])/g,"");winname=winname.split(' ').join('');
	var winl=(screen.width-w)/2;var wint=(screen.height-h)/2;winprops='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no,resizable=no';
	win=window.open(source, winname, winprops);if (parseInt(navigator.appVersion) >= 4) {win.window.focus();}
	return (window.returnValue);
}
/* po w scrolls
--------------------------*/
function popupsc(source, winname, w, h) {
	if (winname=='') {winname=source}
	winname=winname.replace(/([/.-])/g,"");winname=winname.split(' ').join('');
	var winl=(screen.width-w)/2;var wint=(screen.height-h)/2;winprops='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=yes,resizable=yes';
	win=window.open(source, winname, winprops);	if (parseInt(navigator.appVersion) >= 4) {win.window.focus();}
}

/*
window.onload=function() {
	swapLogin(document.getElementById('emInput'),'keyup');
	//multiTab('loginDiv')
}
*/
//-->