function BGNew(obj, new_style) { 
obj.id = new_style;
} 

function ChangeColorOn(object_name, color) {
 object_name.style.backgroundColor = color;
}

function ChangeColorOff(object_name, color) {
 object_name.style.backgroundColor = color;
}

function highlight(obj,highColor){
	if (navigator.appName == "Microsoft Internet Explorer") {
		if (obj.style.backgroundColor != ""){
			obj.style.backgroundColor = "";
		}else{
			obj.style.backgroundColor = highColor;
		}
	}
}

function validate_dropdown (){
    if ( document.searchbox.searchin.selectedIndex == 0 ){
        alert ( "Lütfen arama tipini seçin" );
        return false;
    }else{

    return true;
	}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}





function maskKeyPress(objEvent) 
     {
	   return true;
       var iKeyCode;       
       iKeyCode = objEvent.keyCode;               
       if(iKeyCode>=48 && iKeyCode<=57) return true;
       return false;
     }

var newWindow = false;
var dimageName,dimageWidth,dimageHeight;

function AfterLoad()
{
	var doc = newWindow.document;
	if(!doc) return;
	var dbody = doc.body;
	if(dbody) dbody.innerHTML = '<img src="'+dimageName+'" id="resim"  >';
	//dbody.innerHTML = '<img src="'+dimageName+'" id="resim" height='+dimageHeight+' width='+dimageWidth+' align="middle" >';
	newWindow.myresize();
	newWindow.focus();
	return;	
}

function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop, url, konum) {
	//imageName = imageName.toString().replace(/kucuk_/,"");
	dimageName = imageName; dimageWidth = imageWidth; dimageHeight = imageHeight;
	if(newWindow) newWindow.close();
	newWindow = window.open("resmi_goster.html?"+imageName+"@"+url+"@"+konum/*imageName*/,"newWindow","scroll=yes, resizable=yes, width="+imageWidth+",height="+(parseInt(imageHeight))+",left="+posLeft+",top="+posTop);
	if(document.all)
	{
		var doc = newWindow.document;
		if(!doc) return;
		var dbody = doc.body;
		if(!dbody) return; 
		dbody.innerHTML = '<img src="'+dimageName+'" id="resim" height='+dimageHeight+' width='+dimageWidth+' align="middle" >';
		//if(dbody) dbody.innerHTML = '<img src="'+dimageName+'" id="resim" height='+dimageHeight+' width='+dimageWidth+' align="middle" >';
		newWindow.myresize();
	}
	return;
}

function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}

function uye_sil(adi)
{
	return confirm(adi+" adli üyeyi silmek istediğinizden emin misiniz?");
}

var resetRolls = new Object();

function resetimage(src,lang)
{
this.src=src;
this.confirm=true;
this.alt="Reset";
resetRolls.lang=lang;
this.write=resetimage_write;
}

function resetimage_write()
{
document.write('<A ');
if (this.rollover)
    {
    if (! this.name)
        {
        alert('to create a rollover you must give the image a name');
        return;
        }

    resetRolls[this.name] = new Object();
    resetRolls[this.name].over = new Image();
    resetRolls[this.name].over.src=this.rollover;
    resetRolls[this.name].out = new Image();
    resetRolls[this.name].out.src=this.src;
    document.write(
        ' onMouseOver="if (document.images)document.images[\'' + 
        this.name + '\'].src=resetRolls[\'' + this.name + '\'].over.src"' + 
        ' onMouseOut="if (document.images)document.images[\'' + 
        this.name + '\'].src=resetRolls[\'' + this.name + '\'].out.src"'
        );
    }
document.write(' HREF="javascript:');	
       if(resetRolls.lang=="tr")
       {
		  if (this.confirm)
          document.write('if(confirm(\'Forma girdiniz bilgileri silmek istediginizden emin misiniz?\'))');
       }else{
		  if (this.confirm)
	      document.write('if(confirm(\'sure?\'))');
       }
document.write(
    'document.forms[' + 
    (document.forms.length - 1) + '].reset();void(0);">');
document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '"');
document.write(' BORDER=0');
if (this.name)document.write(' NAME="' + this.name + '"');
if (this.height)document.write(' HEIGHT=' + this.height);
if (this.width)document.write(' WIDTH=' + this.width);
if (this.otheratts)document.write(' '+ this.otheratts);
document.write('></A>');
}



var submitRolls = new Object();
function submitroll(src, oversrc, name)
{
this.src=src;
this.oversrc=oversrc;
this.name=name;
this.alt="Submit";
this.write=submitroll_write;
}
function submitroll_write()
{
var thisform = 'document.forms[' + (document.forms.length - 1) + ']';
submitRolls[this.name] = new Object();
submitRolls[this.name].over = new Image();
submitRolls[this.name].over.src = this.oversrc;
submitRolls[this.name].out = new Image();
submitRolls[this.name].out.src = this.src;

document.write
	(
	'<A onMouseOver="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].over.src"' + 
	' onMouseOut="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].out.src"' + 
	' HREF="javascript:'
	);

if (this.sendfield)
	{
	if (! this.sendvalue)
		this.sendvalue = 1;
	document.write(thisform, ".elements['", this.sendfield, "'].value='", this.sendvalue, "';");
	}

document.write(thisform + '.submit();void(0);"');
if (this.msg)document.write(' onClick="return confirm(\'' , this.msg, '\')"');
document.write('>');

document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '" BORDER=0 NAME="' + this.name + '"');
if (this.height)document.write(' HEIGHT=' + this.height);
if (this.width)document.write(' WIDTH='  + this.width);
if (this.otheratts)document.write(' ' + this.otheratts);
document.write('></A>');
if (this.sendfield)
	{
	document.write('<INPUT TYPE=HIDDEN NAME="' + this.sendfield + '">');
	document.forms[document.forms.length - 1].elements[this.sendfield].value='';
	}
}




//Hide status bar msg II script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use

function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT | Event.MOUSECLICK | Event.MOUSEBLUR)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
document.onclick=hidestatus
document.onblur=hidestatus
//-->


/*function setPubRate(id,lang){
	
	
}*/


var  xmlHttp;
function createRequest(){
if(window.ActiveXObject){
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest){
  xmlHttp = new XMLHttpRequest();
}
}


function ProcessURL(strURL){
createRequest();
xmlHttp.open("GET", strURL, true);
//xmlHttp.onreadystatechange = StateChange;
xmlHttp.send(null);
} 

function goConfirm(title, link){
if(confirm(title) == true){
window.location.href = link;
return true;
} else {
return false;
}
}
