function getCenter(pwidth, pheight){
	var wwidth = screen.width;
	var wheigth = screen.height;

	lpos = (wwidth - pwidth)/2;
	tpos = (wheigth - pheight)/2;

	return lpos, tpos;
}

function PopItUp(src,w,h,s) {
	if (s) w = w+17;
	getCenter(w, h);
	Popwin = window.open(src,"Popwin","toolbar=0,width=" + w + ", height=" + h + ", left="+ lpos +", top="+ tpos +"; location=0, directories=0, status=1, scrollbars="+s+", menubar=0, resizable=1, copyhistory=0");
	Popwin.focus();
	//return false;
}
















function selectMyCombo(_combo){
		_root = "http://" + window.location.hostname;
		_currentPage = window.location.href;
		myCombo = $(_combo);
		for (i=0; i<myCombo.options.length;i++){
			_myComboPage = _root + myCombo.options[i].value ;
			if (_myComboPage == _currentPage){
				
				myCombo.options[i].selected = true;
				break;
			}
		}		
}




var DWin 
function DemirWin(url,name){	
	DWin = window.open(url,name,"toolbar=0,top=0,left=0,width=790,height=620,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=1"); 
}






var exObj="";
var exClickObj="";
var selecterFlag=0;
function showHideElement(_elm, clickObj){	
		myElement = $(_elm)
		if (myElement){
			if (myElement.style.display == ""){
				myElement.style.display = "none";
			}
			else{
				myElement.style.display = "";
			}
		}
		
		if(exObj!="" && exObj != _elm){
			$(exObj).style.display = "none";
		}
		
		if(exObj != _elm){
			exObj = _elm;
		}
		
		if (exClickObj != ""){					
			exClickObj.className = "";
		}
		if (clickObj){
			if (clickObj != exClickObj){
				selecterFlag=1;
			}
			else{
				if (selecterFlag==1){selecterFlag=0;}
				else{selecterFlag=1;}
			}
						
			if (selecterFlag==1){
				clickObj.className += " selected";
			}
			
			
			exClickObj = clickObj;
		}
		
}


function goToPage(_href){
window.location.href=_href;
}




function getWindowHeight(){
	var windowHeight = 0;
	if(typeof(window.innerHeight) == 'number'){
		windowHeight = window.innerHeight;
	}else{
		if(document.documentElement && document.documentElement.clientHeight){
			windowHeight = document.documentElement.clientHeight;
		}else{
			if(document.body && document.body.clientHeight){
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

/*English */
function external(href) {
	PopItUp("external.asp?"+href, 460, 260, 0);
}

function external_2(href) {
	PopItUp("external_2.asp?"+href, 460, 260, 0);
}

function external_3(href) {
	PopItUp("external_3.asp?"+href, 460, 260, 0);
}

/*Tükçe*/
function external_tr(href) {
	PopItUp("/tr/external.asp?"+href, 460, 260, 0);
}

function external_tr_2(href) {
	PopItUp("/tr/external_2.asp?"+href, 460, 260, 0);
}


