// JavaScript Document
function srcconv(oobj,ln)
{
  var nesne = null;
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(oobj); }
  if (obj){
	nesne = obj.src.substring(0, (obj.src.length - 6))+ln+".png";
	//alert(nesne);
    eval("obj.src = nesne");
  };
}

function onconv(oobj,ln)
{
  var nesne = null;
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(oobj); }
  if (obj){
	nesne = obj.src.substring(0, (obj.src.length - 7))+"2"+ln+".png";
	//alert(nesne);
    eval("obj.src = nesne");
  };
}

function offconv(oobj,ln)
{
  var nesne = null;
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(oobj); }
  if (obj){
	nesne = obj.src.substring(0, (obj.src.length - 7))+"1"+ln+".png";
	//alert(nesne);
    eval("obj.src = nesne");
  };
}

function langchg(lng)
{
 yazi.filters[0].Apply();
 im1.filters[0].Apply();
 im2.filters[0].Apply();
 im3.filters[0].Apply();
 im4.filters[0].Apply();
 im5.filters[0].Apply();
 im6.filters[0].Apply();
 if(lng =="en")
 {
 langsec.lang = "en";
 yazi.innerHTML = etext; 
 srcconv('im1','en');
 srcconv('im2','en');
 srcconv('im3','en');
 srcconv('im4','en');
 srcconv('im5','en');
 srcconv('im6','en');
 } else
 {
 langsec.lang ="tr";
 yazi.innerHTML = ttext; 
 srcconv('im1','tr');
 srcconv('im2','tr');
 srcconv('im3','tr');
 srcconv('im4','tr');
 srcconv('im5','tr');
 srcconv('im6','tr');
 }
 yazi.filters[0].Play(); 
 im1.filters[0].Play(); 
 im2.filters[0].Play(); 
 im3.filters[0].Play(); 
 im4.filters[0].Play(); 
 im5.filters[0].Play(); 
 im6.filters[0].Play(); 
}

function langset()
{
var query = location.href.substring((location.href.indexOf('?')+1), location.href.length);
if(location.href.indexOf('?') < 0) query = '';
querysplit = query.split('&');
query = new Array();

for(var i = 0; i < querysplit.length; i++){
    var namevalue = querysplit[i].split('=');
    namevalue[1] = namevalue[1].replace(/\+/g, ' ');
    query[namevalue[0]] = unescape(namevalue[1]);
}
langchg(query['ln']);
}

