function openwindow(theURL,winName,features) { //pencere ac
  window.open(theURL,winName,features);
}

function egazete(theURL,theURL2) { //egazete ac
var URL='egazete.php?tarih='+theURL+'&sayfa='+theURL2;
var winName='Dijital-Gazete';
var features='status=yes,width=995,height=730';
  window.open(URL,'winName',features);
}

function v(){ // bos fonksiyon
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function addbookmark(){ // sik kullanillanlara ekle
var bookmarkurl="http://www.gaziantepolusum.com"
var bookmarktitle="Oluşum Gazetesi"
if (document.all)
        window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function popp(source,obj, width, height)        {
newWindow = window.open(source,obj,"menubar=0,scrollbars=1,resizable=0,width=" + width + ",height=" + height);
}


var highlightcolor="dbe7fa"   
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

var intended=/INPUT|TEXTAREA|SELECT|OPTION/

function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}
// renklendirme bitis

function expandcollapse (a1,a2){ 

	whichpost = document.getElementById(a1); 
	whichpost2 = document.getElementById(a2); 
   
   if (whichpost2.className=="postshown")
   whichpost2.className="posthidden";
   
   if (whichpost.className=="postshown") { 
      whichpost.className="posthidden";
   } 
   else { 
      whichpost.className="postshown";
	  
   } 
}

function krKontrol(objThis,sName,nMaxLength,sCountName)
		{
			var sFormName=objThis.form.name;
			document[sFormName][sCountName].value= nMaxLength;
			if (document[sFormName][sName].value.length > nMaxLength)
			{
				document[sFormName][sName].value = document[sFormName][sName].value.substring(0,nMaxLength);
				var charleft = 0;
			}
			else {charleft = nMaxLength - document[sFormName][sName].value.length}
			document[sFormName][sCountName].value = charleft;
		}
		
		
function setLyr(obj,lyr)
{
	var coors = findPos(obj);
	if (lyr == 'testP') coors[1] -= 50;
	var x = document.getElementById(lyr);
	x.style.visibility='visible';
	x.style.top = coors[1]+ 14 + 'px';
	x.style.left = coors[0]+ 20 + 'px';
}

function findPos(obj)
{
	var curleft = curtop = 0;
	obj=document.getElementById(obj);
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop]; alert (curleft+'+'+curtop);
}

function yazar(isim,id1,baslik,resim,tarih){ // aciklama degistir

yazarisim.innerHTML=isim;
yazarkose.innerHTML=tarih;
yazaryazi.innerHTML='<a href="koseyazari.php?id=' + id1 + '" class="yz_link">' + baslik + "</a>";
yazarresim.innerHTML='<a href="koseyazari.php?id=' + id1 + '"><img src="resimler/yazarlar/'+resim+'" width="60" height="70" border="0"></a>';

}
