//shocker search
/* ---------------------------- */
/* XMLHTTPRequest Enable */
/* ---------------------------- */
function createObject() {
	var request_type;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer"){
	request_type = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		request_type = new XMLHttpRequest();
	}
	return request_type;
}

var http = createObject();

/* -------------------------- */
/* SEARCH */
/* -------------------------- */
function searchNameq() {
	searchq = encodeURIComponent(document.getElementById('searchq').value);
	//document.getElementById('msg').style.display = "block";
	//document.getElementById('msg').innerHTML = "Cautam <strong>" + searchq+"";
	// Set te random number to add to URL request

	document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Cautam <strong>" + searchq+" ...";
	nocache = Math.random();
	http.open('get', 'search.php?cauta='+searchq+'&nocache = '+nocache);
	http.onreadystatechange = searchNameqReply;
	http.send(null);
}

function searchNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('detalii').innerHTML = response;
	}
}
//eof

//zile bune, zile rele
/*
var xhReq = createXMLHttpRequest();
function createXMLHttpRequest() { 
 try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {} 
 try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} 
 try { return new XMLHttpRequest(); } catch(e) {} 
 alert("XMLHttpRequest not supported");  return null;}

function mySubmit(id, bigText) {  
var url    = "SubmitPost.cfm"; 
 var params = "id=" + id + "&bigtext=" + encodeURI(bigText); 
 xhReq.open("POST", url, true);  //Send the header information along with the request 
 xhReq.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 
 xhReq.setRequestHeader("Content-length", params.length); 
 xhReq.setRequestHeader("Connection", "close"); 
 xhReq.onreadystatechange = onPostSubmit; 
 xhReq.send(params);}function onPostSubmit() { 
 if (xhReq.readyState==4 || xhReq.readyState=="complete")     { 
     if (xhReq.status != 200)        {  
      alert('BadStatus');   
     return; 
       } 
   }
 }

encodeURIComponent not encodeURI.

Default the maximum size of the request entity body on the client is likely only limited by the available memory. The server as has already been pointed out may reject entity bodies over a certain size. IIS 6 and 7 for example have a 200KB default limit.

*/


//login fcn
function loginNameq() {
	userq = encodeURIComponent(document.getElementById('userq').value);
	passq = encodeURIComponent(document.getElementById('passq').value);

	document.getElementById('userbar').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'login.php?user='+userq+'&pass='+passq+'&nocache = '+nocache);
	http.onreadystatechange = loginNameqReply;
	http.send(null);
}
function loginNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('userbar').innerHTML = response;
	}
}
//eof


//recover fcn
function recoverNameq() {
	userq = encodeURIComponent(document.getElementById('userq').value);
	emailq = encodeURIComponent(document.getElementById('emailq').value);

	document.getElementById('userbar').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'reset-pwd.php?reuser='+userq+'&remail='+emailq+'&nocache = '+nocache);
	http.onreadystatechange = recoverNameqReply;
	http.send(null);
}
function recoverNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('userbar').innerHTML = response;
	}
}
//eof

//signup fcn
function signupNameq() {
	usernameq = encodeURIComponent(document.getElementById('usernameq').value);
	emailq = encodeURIComponent(document.getElementById('emailq').value);
	yahooidq = encodeURIComponent(document.getElementById('yahooidq').value);

	document.getElementById('userbar').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'signup.php?username='+usernameq+'&email='+emailq+'&yahooid='+yahooidq+'&nocache = '+nocache);
	http.onreadystatechange = signupNameqReply;
	http.send(null);
}
function signupNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('userbar').innerHTML = response;
	}
}
//eof

//profile fcn
function profileNameq() {
	shownq = encodeURIComponent(document.getElementById('shownq').value);
	passwdxxq = encodeURIComponent(document.getElementById('passwdxxq').value);
	passwdxxxq = encodeURIComponent(document.getElementById('passwdxxxq').value);

	document.getElementById('clienti').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'profile.php?shown='+shownq+'&passwdxx='+passwdxxq+'&passwdxxx='+passwdxxxq+'&nocache = '+nocache);
	http.onreadystatechange = profileNameqReply;
	http.send(null);
}
function profileNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('clienti').innerHTML = response;
	}
}
//eof

//uimdb fcn
function uimdbNameq() {
	uimdbq = encodeURIComponent(document.getElementById('uimdbq').value);
	uimdblq = encodeURIComponent(document.getElementById('uimdblq').value);

	document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'upload.php?uimdb='+uimdbq+'&uimdbl='+uimdblq+'&nocache = '+nocache);
	http.onreadystatechange = uimdbNameqReply;
	http.send(null);
}
function uimdbNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('detalii').innerHTML = response;
		//document.getElementById('clienti').innerHTML = "&laquo;";
	}
}
//eof

//subdb fcn
function subNameq() {
	try {
		try { tradselect = encodeURIComponent(document.getElementById('tradselect').value); } catch (e) { tradselect=""; }
		try { sezo = encodeURIComponent(document.getElementById('sezo').value); } catch (e) { sezo=""; }
		try { vcdq = encodeURIComponent(document.getElementById('vcdq').value); } catch (e) { vcdq=""; }
		try { ttdbnume = encodeURIComponent(document.getElementById('ttdbnume').value); } catch (e) { ttdbnume=""; }
		try { ttdban = encodeURIComponent(document.getElementById('ttdban').value); } catch (e) { ttdban=""; }
		try { ttdbpoza = encodeURIComponent(document.getElementById('ttdbpoza').value); } catch (e) { ttdbpoza=""; }
		try { ttdbgen = encodeURIComponent(document.getElementById('ttdbgen').value); } catch (e) { ttdbgen=""; }
		try { ttdbtip = encodeURIComponent(document.getElementById('ttdbtip').value); } catch (e) { ttdbtip=""; }
		try { traducator = encodeURIComponent(document.getElementById('traducator').value); } catch (e) { traducator=""; }
		try { release2 = encodeURIComponent(document.getElementById('release2').value); } catch (e) { release2=""; }
		try { parti = encodeURIComponent(document.getElementById('parti').value); } catch (e) { parti=""; }
		try { fps = encodeURIComponent(document.getElementById('fps').value); } catch (e) { fps=""; }
		try { diacritice = encodeURIComponent(document.getElementById('diacritice').value); } catch (e) { diacritice=""; }
		try { tvqs = encodeURIComponent(document.getElementById('tvqs').value); } catch (e) { tvqs=""; }
		try { wsc = encodeURIComponent(document.getElementById('wsc').value); } catch (e) { wsc=""; }
		try { comentariu = encodeURIComponent(document.getElementById('comentariu').value); } catch (e) { comentariu=""; }
		try { uimdb = encodeURIComponent(document.getElementById('uimdb').value); } catch (e) { uimdb=""; }
		try { sincronizator = encodeURIComponent(document.getElementById('sincronizator').value); } catch (e) { sincronizator=""; }

		document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
		nocache = Math.random();
		http.open('get', 'upload.php?tradselect='+tradselect+'&sincronizator='+sincronizator+'&sezo='+sezo+'&vcdq='+vcdq+'&ttdbnume='+ttdbnume+'&ttdban='+ttdban+'&ttdbpoza='+ttdbpoza+'&ttdbgen='+ttdbgen+'&ttdbtip='+ttdbtip+'&traducator='+traducator+'&release2='+release2+'&parti='+parti+'&fps='+fps+'&diacritice='+diacritice+'&tvqs='+tvqs+'&wsc='+wsc+'&comentariu='+comentariu+'&uimdb='+uimdb+'&nocache = '+nocache);
		http.onreadystatechange = subNameqReply;
		http.send(null);

	} 
	catch (e) { 
		alert (e);
	} 
}

function subNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('detalii').innerHTML = response;
	}
}
//eof

//upload fcn
function startUpload(){
      document.getElementById('f1_upload_process').style.visibility = 'visible';
      document.getElementById('f1_upload_form').style.visibility = 'hidden';
      return true;
}

function stopUpload(success){
      var result = '';
      if (success == 1){
         result = 'Nu acceptam decat fisiere cu extensia .sub si .srt';
      }
      if (success == 2) {
         result = 'Server error.';
      }
      if (success == 3) {
         result = 'Nu acceptam subtitrari mai mari de 1 Megabyte.';
      }
      if (success == 4) {
         result = 'Subtitrarea a fost preluata cu succes.';
      }

      document.getElementById('f1_upload_process').style.visibility = 'hidden';
      document.getElementById('f1_upload_form').innerHTML = result;
      document.getElementById('f1_upload_form').style.visibility = 'visible';      
      return true;   
}

//eof

//ads fcn
function adsNameq() {
	ads1 = encodeURIComponent(document.getElementById('ads1').value);
	ads2 = encodeURIComponent(document.getElementById('ads2').value);
	uid = encodeURIComponent(document.getElementById('uid').value);
	idedit = encodeURIComponent(document.getElementById('idedit').value);

	document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'cpanel/ads.php?uid='+uid+'&ads1='+ads1+'&ads2='+ads2+'&idedit='+idedit+'&nocache = '+nocache);
	http.onreadystatechange = adsNameqReply;
	http.send(null);
}
function adsNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('detalii').innerHTML = response;
	}
}
//eof

//select fcn
function selectNameq() {
	filmzona = encodeURIComponent(document.getElementById('filmzona').value);

	document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'cpanel/vfilmzona.php?filmzona='+filmzona+'&nocache = '+nocache);
	http.onreadystatechange = selectNameqReply;
	http.send(null);
}
function selectNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('detalii').innerHTML = response;
	}
}
//eof

//signup fcn
function csignupNameq() {
	try {act = encodeURIComponent(document.getElementById('act').value);} catch (e) { act=""; }
 	try {tip = encodeURIComponent(document.getElementById('tip').value);} catch (e) { tip=""; }
 	try {statut = encodeURIComponent(document.getElementById('statut').value);} catch (e) { statut=""; }
 	try {nume = encodeURIComponent(document.getElementById('nume').value);} catch (e) { nume=""; }
	try {prenume = encodeURIComponent(document.getElementById('prenume').value);} catch (e) { prenume=""; }
	try {email = encodeURIComponent(document.getElementById('email').value);} catch (e) { email=""; }
	try {telefon = encodeURIComponent(document.getElementById('telefon').value);} catch (e) { telefon=""; }
	try {fax = encodeURIComponent(document.getElementById('fax').value);} catch (e) { fax=""; }
	try {email_rap = encodeURIComponent(document.getElementById('email_rap').value);} catch (e) { email_rap=""; }
	try {email_fac = encodeURIComponent(document.getElementById('email_fac').value);} catch (e) { email_fac=""; }
	try {fnume = encodeURIComponent(document.getElementById('fnume').value);} catch (e) { fnume=""; }
	try {fprenume = encodeURIComponent(document.getElementById('fprenume').value);} catch (e) { fprenume=""; }
	try {fbi_serie = encodeURIComponent(document.getElementById('fbi_serie').value);} catch (e) { fbi_serie=""; }
	try {fbi_nr = encodeURIComponent(document.getElementById('fbi_nr').value);} catch (e) { fbi_nr=""; }
	try {fbi_eliberat = encodeURIComponent(document.getElementById('fbi_eliberat').value);} catch (e) { fbi_eliberat=""; }
	try {fbi_cnp = encodeURIComponent(document.getElementById('fbi_cnp').value);} catch (e) { fbi_cnp=""; }
	try {fsoc_nume = encodeURIComponent(document.getElementById('fsoc_nume').value);} catch (e) { fsoc_name=""; }
	try {fsoc_regcom = encodeURIComponent(document.getElementById('fsoc_regcom').value);} catch (e) { fsoc_regcom=""; }
	try {fsoc_cui = encodeURIComponent(document.getElementById('fsoc_cui').value);} catch (e) { fsoc_cui=""; }
	try {fsoc_iban = encodeURIComponent(document.getElementById('fsoc_iban').value);} catch (e) { fsoc_iban=""; }
	try {fsoc_banca = encodeURIComponent(document.getElementById('fsoc_banca').value);} catch (e) { fsoc_banca=""; }
	try {fsoc_functia = encodeURIComponent(document.getElementById('fsoc_functia').value);} catch (e) { fsoc_functia=""; }
	try {fadresa = encodeURIComponent(document.getElementById('fadresa').value);} catch (e) { fadresa=""; }
	try {ftara = encodeURIComponent(document.getElementById('ftara').value);} catch (e) { ftara=""; }
	try {fjudet = encodeURIComponent(document.getElementById('fjudet').value);} catch (e) { fjudet=""; }
	try {foras = encodeURIComponent(document.getElementById('foras').value);} catch (e) { foras=""; }
	try {fcodp = encodeURIComponent(document.getElementById('fcodp').value);} catch (e) { fcodp=""; }

	document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'ilucs/index.php?act='+act+'&tip='+tip+'&statut='+statut+'&nume='+nume+'&prenume='+prenume+'&email='+email+'&telefon='+telefon+'&fax='+fax+'&email_rap='+email_rap+'&email_fac='+email_fac+'&fnume='+fnume+'&fprenume='+fprenume+'&fbi_serie='+fbi_serie+'&fbi_nr='+fbi_nr+'&fbi_eliberat='+fbi_eliberat+'&fbi_cnp='+fbi_cnp+'&fsoc_nume='+fsoc_nume+'&fsoc_regcom='+fsoc_regcom+'&fsoc_cui='+fsoc_cui+'&fsoc_iban='+fsoc_iban+'&fsoc_banca='+fsoc_banca+'&fsoc_functia='+fsoc_functia+'&fadresa='+fadresa+'&ftara='+ftara+'&fjudet='+fjudet+'&foras='+foras+'&fcodp='+fcodp+'&nocache = '+nocache);
	http.onreadystatechange = csignupNameqReply;
	http.send(null);
}
function csignupNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('detalii').innerHTML = response;
	}
}
//eof

//signup select country fcn
function scountryChange() {
 	try {tip = encodeURIComponent(document.getElementById('tip').value);} catch (e) { tip=""; }
 	try {statut = encodeURIComponent(document.getElementById('statut').value);} catch (e) { statut=""; }
 	try {nume = encodeURIComponent(document.getElementById('nume').value);} catch (e) { nume=""; }
	try {prenume = encodeURIComponent(document.getElementById('prenume').value);} catch (e) { prenume=""; }
	try {email = encodeURIComponent(document.getElementById('email').value);} catch (e) { email=""; }
	try {telefon = encodeURIComponent(document.getElementById('telefon').value);} catch (e) { telefon=""; }
	try {fax = encodeURIComponent(document.getElementById('fax').value);} catch (e) { fax=""; }
	try {email_rap = encodeURIComponent(document.getElementById('email_rap').value);} catch (e) { email_rap=""; }
	try {email_fac = encodeURIComponent(document.getElementById('email_fac').value);} catch (e) { email_fac=""; }
	try {fnume = encodeURIComponent(document.getElementById('fnume').value);} catch (e) { fnume=""; }
	try {fprenume = encodeURIComponent(document.getElementById('fprenume').value);} catch (e) { fprenume=""; }
	try {fbi_serie = encodeURIComponent(document.getElementById('fbi_serie').value);} catch (e) { fbi_serie=""; }
	try {fbi_nr = encodeURIComponent(document.getElementById('fbi_nr').value);} catch (e) { fbi_nr=""; }
	try {fbi_eliberat = encodeURIComponent(document.getElementById('fbi_eliberat').value);} catch (e) { fbi_eliberat=""; }
	try {fbi_cnp = encodeURIComponent(document.getElementById('fbi_cnp').value);} catch (e) { fbi_cnp=""; }
	try {fsoc_nume = encodeURIComponent(document.getElementById('fsoc_nume').value);} catch (e) { fsoc_name=""; }
	try {fsoc_regcom = encodeURIComponent(document.getElementById('fsoc_regcom').value);} catch (e) { fsoc_regcom=""; }
	try {fsoc_cui = encodeURIComponent(document.getElementById('fsoc_cui').value);} catch (e) { fsoc_cui=""; }
	try {fsoc_iban = encodeURIComponent(document.getElementById('fsoc_iban').value);} catch (e) { fsoc_iban=""; }
	try {fsoc_banca = encodeURIComponent(document.getElementById('fsoc_banca').value);} catch (e) { fsoc_banca=""; }
	try {fsoc_functia = encodeURIComponent(document.getElementById('fsoc_functia').value);} catch (e) { fsoc_functia=""; }
	try {fadresa = encodeURIComponent(document.getElementById('fadresa').value);} catch (e) { fadresa=""; }
	try {ftara = encodeURIComponent(document.getElementById('ftara').value);} catch (e) { ftara=""; }
	fjudet="";
	foras="";
	try {fcodp = encodeURIComponent(document.getElementById('fcodp').value);} catch (e) { fcodp=""; }

	document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'ilucs/index.php?tip='+tip+'&statut='+statut+'&nume='+nume+'&prenume='+prenume+'&email='+email+'&telefon='+telefon+'&fax='+fax+'&email_rap='+email_rap+'&email_fac='+email_fac+'&fnume='+fnume+'&fprenume='+fprenume+'&fbi_serie='+fbi_serie+'&fbi_nr='+fbi_nr+'&fbi_eliberat='+fbi_eliberat+'&fbi_cnp='+fbi_cnp+'&fsoc_nume='+fsoc_nume+'&fsoc_regcom='+fsoc_regcom+'&fsoc_cui='+fsoc_cui+'&fsoc_iban='+fsoc_iban+'&fsoc_banca='+fsoc_banca+'&fsoc_functia='+fsoc_functia+'&fadresa='+fadresa+'&ftara='+ftara+'&fjudet='+fjudet+'&foras='+foras+'&fcodp='+fcodp+'&nocache = '+nocache);
	http.onreadystatechange = csignupNameqReply;
	http.send(null);
}
//eof

//signup select region fcn
function sregionChange() {
 	try {tip = encodeURIComponent(document.getElementById('tip').value);} catch (e) { tip=""; }
 	try {statut = encodeURIComponent(document.getElementById('statut').value);} catch (e) { statut=""; }
 	try {nume = encodeURIComponent(document.getElementById('nume').value);} catch (e) { nume=""; }
	try {prenume = encodeURIComponent(document.getElementById('prenume').value);} catch (e) { prenume=""; }
	try {email = encodeURIComponent(document.getElementById('email').value);} catch (e) { email=""; }
	try {telefon = encodeURIComponent(document.getElementById('telefon').value);} catch (e) { telefon=""; }
	try {fax = encodeURIComponent(document.getElementById('fax').value);} catch (e) { fax=""; }
	try {email_rap = encodeURIComponent(document.getElementById('email_rap').value);} catch (e) { email_rap=""; }
	try {email_fac = encodeURIComponent(document.getElementById('email_fac').value);} catch (e) { email_fac=""; }
	try {fnume = encodeURIComponent(document.getElementById('fnume').value);} catch (e) { fnume=""; }
	try {fprenume = encodeURIComponent(document.getElementById('fprenume').value);} catch (e) { fprenume=""; }
	try {fbi_serie = encodeURIComponent(document.getElementById('fbi_serie').value);} catch (e) { fbi_serie=""; }
	try {fbi_nr = encodeURIComponent(document.getElementById('fbi_nr').value);} catch (e) { fbi_nr=""; }
	try {fbi_eliberat = encodeURIComponent(document.getElementById('fbi_eliberat').value);} catch (e) { fbi_eliberat=""; }
	try {fbi_cnp = encodeURIComponent(document.getElementById('fbi_cnp').value);} catch (e) { fbi_cnp=""; }
	try {fsoc_nume = encodeURIComponent(document.getElementById('fsoc_nume').value);} catch (e) { fsoc_name=""; }
	try {fsoc_regcom = encodeURIComponent(document.getElementById('fsoc_regcom').value);} catch (e) { fsoc_regcom=""; }
	try {fsoc_cui = encodeURIComponent(document.getElementById('fsoc_cui').value);} catch (e) { fsoc_cui=""; }
	try {fsoc_iban = encodeURIComponent(document.getElementById('fsoc_iban').value);} catch (e) { fsoc_iban=""; }
	try {fsoc_banca = encodeURIComponent(document.getElementById('fsoc_banca').value);} catch (e) { fsoc_banca=""; }
	try {fsoc_functia = encodeURIComponent(document.getElementById('fsoc_functia').value);} catch (e) { fsoc_functia=""; }
	try {fadresa = encodeURIComponent(document.getElementById('fadresa').value);} catch (e) { fadresa=""; }
	try {ftara = encodeURIComponent(document.getElementById('ftara').value);} catch (e) { ftara=""; }
	try {fjudet = encodeURIComponent(document.getElementById('fjudet').value);} catch (e) { fjudet=""; }
	foras="";
	try {fcodp = encodeURIComponent(document.getElementById('fcodp').value);} catch (e) { fcodp=""; }

	document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'ilucs/index.php?tip='+tip+'&statut='+statut+'&nume='+nume+'&prenume='+prenume+'&email='+email+'&telefon='+telefon+'&fax='+fax+'&email_rap='+email_rap+'&email_fac='+email_fac+'&fnume='+fnume+'&fprenume='+fprenume+'&fbi_serie='+fbi_serie+'&fbi_nr='+fbi_nr+'&fbi_eliberat='+fbi_eliberat+'&fbi_cnp='+fbi_cnp+'&fsoc_nume='+fsoc_nume+'&fsoc_regcom='+fsoc_regcom+'&fsoc_cui='+fsoc_cui+'&fsoc_iban='+fsoc_iban+'&fsoc_banca='+fsoc_banca+'&fsoc_functia='+fsoc_functia+'&fadresa='+fadresa+'&ftara='+ftara+'&fjudet='+fjudet+'&foras='+foras+'&fcodp='+fcodp+'&nocache = '+nocache);
	http.onreadystatechange = csignupNameqReply;
	http.send(null);
}
//eof

//configurare reclama add fcn
function crForm() {
	try {act = encodeURIComponent(document.getElementById('act').value);} catch (e) { act=""; }
 	try {spam1 = encodeURIComponent(document.getElementById('spam1').value);} catch (e) { spam1=""; }
 	try {spam2 = encodeURIComponent(document.getElementById('spam2').value);} catch (e) { spam2=""; }
 	try {genfilm_tip = encodeURIComponent(get_radio_value(document.configrForm.genfilm_tip));} catch (e) { genfilm_tip=""; }
 	try {genfilm = encodeURIComponent(combinesel(document.getElementById('genfilm')));} catch (e) { genfilm=""; }
 	try {actori_tip = encodeURIComponent(get_radio_value(document.configrForm.actori_tip));} catch (e) { actori_tip=""; }
 	try {actori = encodeURIComponent(document.getElementById('actori').value);} catch (e) { actori=""; }
 	try {regizori_tip = encodeURIComponent(get_radio_value(document.configrForm.regizori_tip));} catch (e) { regizori_tip=""; }
 	try {regizori = encodeURIComponent(document.getElementById('regizori').value);} catch (e) { regizori=""; }
 	try {aparitie1 = encodeURIComponent(document.getElementById('aparitie1').value);} catch (e) { aparitie1=""; }
 	try {aparitie2 = encodeURIComponent(document.getElementById('aparitie2').value);} catch (e) { aparitie2=""; }
 	try {afisari = encodeURIComponent(document.getElementById('afisari').value);} catch (e) { afisari=""; }
 	try {secunde = encodeURIComponent(document.getElementById('secunde').value);} catch (e) { secunde=""; }
 	try {perioada1 = encodeURIComponent(document.getElementById('perioada1').value);} catch (e) { perioada1=""; }
 	try {perioada2 = encodeURIComponent(document.getElementById('perioada2').value);} catch (e) { perioada2=""; }
 	try {culori = encodeURIComponent(get_radio_value(document.configrForm.culori));} catch (e) { culori=""; }
 	try {tari_tip = encodeURIComponent(get_radio_value(document.configrForm.tari_tip));} catch (e) { tari_tip=""; }
 	try {tari = encodeURIComponent(combinesel(document.getElementById('tari')));} catch (e) { tari=""; }
 	try {regiuni_tip = encodeURIComponent(get_radio_value(document.configrForm.regiuni_tip));} catch (e) { regiuni_tip=""; }
 	try {regiuni = encodeURIComponent(document.getElementById('regiuni').value);} catch (e) { regiuni=""; }
 	try {orase_tip = encodeURIComponent(get_radio_value(document.configrForm.orase_tip));} catch (e) { orase_tip=""; }
 	try {orase = encodeURIComponent(document.getElementById('orase').value);} catch (e) { orase=""; }
 	try {localizare_tip = encodeURIComponent(get_radio_value(document.configrForm.localizare_tip));} catch (e) { localizare_tip=""; }
 	try {filme_tip = encodeURIComponent(get_radio_value(document.configrForm.filme_tip));} catch (e) { filme_tip=""; }
 	try {filme = encodeURIComponent(document.getElementById('filme').value);} catch (e) { filme=""; }

	document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'ilucs/config_reclama.php?act='+act+'&spam1='+spam1+'&spam2='+spam2+'&filme_tip='+filme_tip+'&filme='+filme+'&genfilm_tip='+genfilm_tip+'&genfilm='+genfilm+'&actori_tip='+actori_tip+'&actori='+actori+'&regizori_tip='+regizori_tip+'&regizori='+regizori+'&aparitie1='+aparitie1+'&aparitie2='+aparitie2+'&afisari='+afisari+'&secunde='+secunde+'&perioada1='+perioada1+'&perioada2='+perioada2+'&culori='+culori+'&tari_tip='+tari_tip+'&tari='+tari+'&regiuni_tip='+regiuni_tip+'&regiuni='+regiuni+'&orase_tip='+orase_tip+'&orase='+orase+'&localizare_tip='+localizare_tip+'&nocache = '+nocache);
	http.onreadystatechange = crFormReply;
	http.send(null);
}
//eof

function crFormReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('detalii').innerHTML = response;
		if (response.indexOf('text/javascript')>0) 
		 {
		  var scrStart = response.indexOf('"text/javascript">'); 
		  var scrStop = response.indexOf('</script>'); 
		  var scrExe = response.substring(scrStart+18,scrStop); 
		  eval(scrExe); 
		 }		
	}
}
//eof

//configurare reclama add fcn step 2
function crForm2() {
 	try {spam1 = encodeURIComponent(document.configrForm2.spam1.value);} catch (e) { spam1=""; }
 	try {spam2 = encodeURIComponent(document.configrForm2.spam2.value);} catch (e) { spam2=""; }
 	try {genfilm_tip = encodeURIComponent(document.configrForm2.genfilm_tip.value);} catch (e) { genfilm_tip=""; }
 	try {genfilm = encodeURIComponent(document.configrForm2.genfilm.value);} catch (e) { genfilm=""; }
 	try {actori_tip = encodeURIComponent(document.configrForm2.actori_tip.value);} catch (e) { actori_tip=""; }
 	try {actori = encodeURIComponent(document.configrForm2.actori.value);} catch (e) { actori=""; }
 	try {regizori_tip = encodeURIComponent(document.configrForm2.regizori_tip.value);} catch (e) { regizori_tip=""; }
 	try {regizori = encodeURIComponent(document.configrForm2.regizori.value);} catch (e) { regizori=""; }
 	try {aparitie1 = encodeURIComponent(document.configrForm2.aparitie1.value);} catch (e) { aparitie1=""; }
 	try {aparitie2 = encodeURIComponent(document.configrForm2.aparitie2.value);} catch (e) { aparitie2=""; }
 	try {afisari = encodeURIComponent(document.configrForm2.afisari.value);} catch (e) { afisari=""; }
 	try {secunde = encodeURIComponent(document.configrForm2.secunde.value);} catch (e) { secunde=""; }
 	try {perioada1 = encodeURIComponent(document.configrForm2.perioada1.value);} catch (e) { perioada1=""; }
 	try {perioada2 = encodeURIComponent(document.configrForm2.perioada2.value);} catch (e) { perioada2=""; }
 	try {culori = encodeURIComponent(document.configrForm2.culori.value);} catch (e) { culori=""; }
 	try {tari_tip = encodeURIComponent(document.configrForm2.tari_tip.value);} catch (e) { tari_tip=""; }
 	try {tari = encodeURIComponent(document.configrForm2.tari.value);} catch (e) { tari=""; }
 	try {regiuni_tip = encodeURIComponent(document.configrForm2.regiuni_tip.value);} catch (e) { regiuni_tip=""; }
 	try {regiuni = encodeURIComponent(document.configrForm2.regiuni.value);} catch (e) { regiuni=""; }
 	try {orase_tip = encodeURIComponent(document.configrForm2.orase_tip.value);} catch (e) { orase_tip=""; }
 	try {orase = encodeURIComponent(document.configrForm2.orase.value);} catch (e) { orase=""; }
 	try {localizare_tip = encodeURIComponent(document.configrForm2.localizare_tip.value);} catch (e) { localizare_tip=""; }
 	try {filme_tip = encodeURIComponent(document.configrForm2.filme_tip.value);} catch (e) { filme_tip=""; }
 	try {filme = encodeURIComponent(document.configrForm2.filme.value);} catch (e) { filme=""; }

	document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'ilucs/config_reclama2.php?spam1='+spam1+'&spam2='+spam2+'&filme_tip='+filme_tip+'&filme='+filme+'&genfilm_tip='+genfilm_tip+'&genfilm='+genfilm+'&actori_tip='+actori_tip+'&actori='+actori+'&regizori_tip='+regizori_tip+'&regizori='+regizori+'&aparitie1='+aparitie1+'&aparitie2='+aparitie2+'&afisari='+afisari+'&secunde='+secunde+'&perioada1='+perioada1+'&perioada2='+perioada2+'&culori='+culori+'&tari_tip='+tari_tip+'&tari='+tari+'&regiuni_tip='+regiuni_tip+'&regiuni='+regiuni+'&orase_tip='+orase_tip+'&orase='+orase+'&localizare_tip='+localizare_tip+'&nocache = '+nocache);
	http.onreadystatechange = crFormReply;
	http.send(null);
}
//eof

//configurare reclama back to step1
function crbForm() {
 	try {spam1 = encodeURIComponent(document.configrbsForm.spam1.value);} catch (e) { spam1=""; }
 	try {spam2 = encodeURIComponent(document.configrbsForm.spam2.value);} catch (e) { spam2=""; }
 	try {genfilm_tip = encodeURIComponent(document.configrbsForm.genfilm_tip.value);} catch (e) { genfilm_tip=""; }
 	try {genfilm = encodeURIComponent(document.configrbsForm.genfilm.value);} catch (e) { genfilm=""; }
 	try {actori_tip = encodeURIComponent(document.configrbsForm.actori_tip.value);} catch (e) { actori_tip=""; }
 	try {actori = encodeURIComponent(document.configrbsForm.actori.value);} catch (e) { actori=""; }
 	try {regizori_tip = encodeURIComponent(document.configrbsForm.regizori_tip.value);} catch (e) { regizori_tip=""; }
 	try {regizori = encodeURIComponent(document.configrbsForm.regizori.value);} catch (e) { regizori=""; }
 	try {aparitie1 = encodeURIComponent(document.configrbsForm.aparitie1.value);} catch (e) { aparitie1=""; }
 	try {aparitie2 = encodeURIComponent(document.configrbsForm.aparitie2.value);} catch (e) { aparitie2=""; }
 	try {afisari = encodeURIComponent(document.configrbsForm.afisari.value);} catch (e) { afisari=""; }
 	try {secunde = encodeURIComponent(document.configrbsForm.secunde.value);} catch (e) { secunde=""; }
 	try {perioada1 = encodeURIComponent(document.configrbsForm.perioada1.value);} catch (e) { perioada1=""; }
 	try {perioada2 = encodeURIComponent(document.configrbsForm.perioada2.value);} catch (e) { perioada2=""; }
 	try {culori = encodeURIComponent(document.configrbsForm.culori.value);} catch (e) { culori=""; }
 	try {tari_tip = encodeURIComponent(document.configrbsForm.tari_tip.value);} catch (e) { tari_tip=""; }
 	try {tari = encodeURIComponent(document.configrbsForm.tari.value);} catch (e) { tari=""; }
 	try {regiuni_tip = encodeURIComponent(document.configrbsForm.regiuni_tip.value);} catch (e) { regiuni_tip=""; }
 	try {regiuni = encodeURIComponent(document.configrbsForm.regiuni.value);} catch (e) { regiuni=""; }
 	try {orase_tip = encodeURIComponent(document.configrbsForm.orase_tip.value);} catch (e) { orase_tip=""; }
 	try {orase = encodeURIComponent(document.configrbsForm.orase.value);} catch (e) { orase=""; }
 	try {localizare_tip = encodeURIComponent(document.configrbsForm.localizare_tip.value);} catch (e) { localizare_tip=""; }
 	try {filme_tip = encodeURIComponent(document.configrbsForm.filme_tip.value);} catch (e) { filme_tip=""; }
 	try {filme = encodeURIComponent(document.configrbsForm.filme.value);} catch (e) { filme=""; }

	document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'ilucs/config_reclama.php?spam1='+spam1+'&spam2='+spam2+'&filme_tip='+filme_tip+'&filme='+filme+'&genfilm_tip='+genfilm_tip+'&genfilm='+genfilm+'&actori_tip='+actori_tip+'&actori='+actori+'&regizori_tip='+regizori_tip+'&regizori='+regizori+'&aparitie1='+aparitie1+'&aparitie2='+aparitie2+'&afisari='+afisari+'&secunde='+secunde+'&perioada1='+perioada1+'&perioada2='+perioada2+'&culori='+culori+'&tari_tip='+tari_tip+'&tari='+tari+'&regiuni_tip='+regiuni_tip+'&regiuni='+regiuni+'&orase_tip='+orase_tip+'&orase='+orase+'&localizare_tip='+localizare_tip+'&nocache = '+nocache);
	http.onreadystatechange = crFormReply;
	http.send(null);
}
//eof

//configurare reclama save
function crsForm() {
 	try {act2 = encodeURIComponent(document.configrbsForm.act2.value);} catch (e) { act2=""; }
 	try {spam1 = encodeURIComponent(document.configrbsForm.spam1.value);} catch (e) { spam1=""; }
 	try {spam2 = encodeURIComponent(document.configrbsForm.spam2.value);} catch (e) { spam2=""; }
 	try {genfilm_tip = encodeURIComponent(document.configrbsForm.genfilm_tip.value);} catch (e) { genfilm_tip=""; }
 	try {genfilm = encodeURIComponent(document.configrbsForm.genfilm.value);} catch (e) { genfilm=""; }
 	try {actori_tip = encodeURIComponent(document.configrbsForm.actori_tip.value);} catch (e) { actori_tip=""; }
 	try {actori = encodeURIComponent(document.configrbsForm.actori.value);} catch (e) { actori=""; }
 	try {regizori_tip = encodeURIComponent(document.configrbsForm.regizori_tip.value);} catch (e) { regizori_tip=""; }
 	try {regizori = encodeURIComponent(document.configrbsForm.regizori.value);} catch (e) { regizori=""; }
 	try {aparitie1 = encodeURIComponent(document.configrbsForm.aparitie1.value);} catch (e) { aparitie1=""; }
 	try {aparitie2 = encodeURIComponent(document.configrbsForm.aparitie2.value);} catch (e) { aparitie2=""; }
 	try {afisari = encodeURIComponent(document.configrbsForm.afisari.value);} catch (e) { afisari=""; }
 	try {secunde = encodeURIComponent(document.configrbsForm.secunde.value);} catch (e) { secunde=""; }
 	try {perioada1 = encodeURIComponent(document.configrbsForm.perioada1.value);} catch (e) { perioada1=""; }
 	try {perioada2 = encodeURIComponent(document.configrbsForm.perioada2.value);} catch (e) { perioada2=""; }
 	try {culori = encodeURIComponent(document.configrbsForm.culori.value);} catch (e) { culori=""; }
 	try {tari_tip = encodeURIComponent(document.configrbsForm.tari_tip.value);} catch (e) { tari_tip=""; }
 	try {tari = encodeURIComponent(document.configrbsForm.tari.value);} catch (e) { tari=""; }
 	try {regiuni_tip = encodeURIComponent(document.configrbsForm.regiuni_tip.value);} catch (e) { regiuni_tip=""; }
 	try {regiuni = encodeURIComponent(document.configrbsForm.regiuni.value);} catch (e) { regiuni=""; }
 	try {orase_tip = encodeURIComponent(document.configrbsForm.orase_tip.value);} catch (e) { orase_tip=""; }
 	try {orase = encodeURIComponent(document.configrbsForm.orase.value);} catch (e) { orase=""; }
 	try {localizare_tip = encodeURIComponent(document.configrbsForm.localizare_tip.value);} catch (e) { localizare_tip=""; }
 	try {filme_tip = encodeURIComponent(document.configrbsForm.filme_tip.value);} catch (e) { filme_tip=""; }
 	try {filme = encodeURIComponent(document.configrbsForm.filme.value);} catch (e) { filme=""; }

	document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'ilucs/config_reclama2.php?act2='+act2+'&spam1='+spam1+'&spam2='+spam2+'&filme_tip='+filme_tip+'&filme='+filme+'&genfilm_tip='+genfilm_tip+'&genfilm='+genfilm+'&actori_tip='+actori_tip+'&actori='+actori+'&regizori_tip='+regizori_tip+'&regizori='+regizori+'&aparitie1='+aparitie1+'&aparitie2='+aparitie2+'&afisari='+afisari+'&secunde='+secunde+'&perioada1='+perioada1+'&perioada2='+perioada2+'&culori='+culori+'&tari_tip='+tari_tip+'&tari='+tari+'&regiuni_tip='+regiuni_tip+'&regiuni='+regiuni+'&orase_tip='+orase_tip+'&orase='+orase+'&localizare_tip='+localizare_tip+'&nocache = '+nocache);
	http.onreadystatechange = crFormReply;
	http.send(null);
}
//eof

//configurare reclama calculare pret
function cpForm() {
 	try {spam1 = encodeURIComponent(document.getElementById('spam1').value);} catch (e) { spam1=""; }
 	try {spam2 = encodeURIComponent(document.getElementById('spam2').value);} catch (e) { spam2=""; }
 	try {genfilm_tip = encodeURIComponent(get_radio_value(document.configrForm.genfilm_tip));} catch (e) { genfilm_tip=""; }
 	try {genfilm = encodeURIComponent(combinesel(document.getElementById('genfilm')));} catch (e) { genfilm=""; }
 	try {actori_tip = encodeURIComponent(get_radio_value(document.configrForm.actori_tip));} catch (e) { actori_tip=""; }
 	try {actori = encodeURIComponent(document.getElementById('actori').value);} catch (e) { actori=""; }
 	try {regizori_tip = encodeURIComponent(get_radio_value(document.configrForm.regizori_tip));} catch (e) { regizori_tip=""; }
 	try {regizori = encodeURIComponent(document.getElementById('regizori').value);} catch (e) { regizori=""; }
 	try {aparitie1 = encodeURIComponent(document.getElementById('aparitie1').value);} catch (e) { aparitie1=""; }
 	try {aparitie2 = encodeURIComponent(document.getElementById('aparitie2').value);} catch (e) { aparitie2=""; }
 	try {afisari = encodeURIComponent(document.getElementById('afisari').value);} catch (e) { afisari=""; }
 	try {secunde = encodeURIComponent(document.getElementById('secunde').value);} catch (e) { secunde=""; }
 	try {perioada1 = encodeURIComponent(document.getElementById('perioada1').value);} catch (e) { perioada1=""; }
 	try {perioada2 = encodeURIComponent(document.getElementById('perioada2').value);} catch (e) { perioada2=""; }
 	try {culori = encodeURIComponent(get_radio_value(document.configrForm.culori));} catch (e) { culori=""; }
 	try {tari_tip = encodeURIComponent(get_radio_value(document.configrForm.tari_tip));} catch (e) { tari_tip=""; }
 	try {tari = encodeURIComponent(combinesel(document.getElementById('tari')));} catch (e) { tari=""; }
 	try {regiuni_tip = encodeURIComponent(get_radio_value(document.configrForm.regiuni_tip));} catch (e) { regiuni_tip=""; }
 	try {regiuni = encodeURIComponent(document.getElementById('regiuni').value);} catch (e) { regiuni=""; }
 	try {orase_tip = encodeURIComponent(get_radio_value(document.configrForm.orase_tip));} catch (e) { orase_tip=""; }
 	try {orase = encodeURIComponent(document.getElementById('orase').value);} catch (e) { orase=""; }
 	try {localizare_tip = encodeURIComponent(get_radio_value(document.configrForm.localizare_tip));} catch (e) { localizare_tip=""; }
 	try {filme_tip = encodeURIComponent(get_radio_value(document.configrForm.filme_tip));} catch (e) { filme_tip=""; }
 	try {filme = encodeURIComponent(document.getElementById('filme').value);} catch (e) { filme=""; }

	document.getElementById('calcpret').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Se calculeaza ...";
	nocache = Math.random();
	http.open('get', 'ilucs/config_reclama_pret.php?spam1='+spam1+'&spam2='+spam2+'&filme_tip='+filme_tip+'&filme='+filme+'&genfilm_tip='+genfilm_tip+'&genfilm='+genfilm+'&actori_tip='+actori_tip+'&actori='+actori+'&regizori_tip='+regizori_tip+'&regizori='+regizori+'&aparitie1='+aparitie1+'&aparitie2='+aparitie2+'&afisari='+afisari+'&secunde='+secunde+'&perioada1='+perioada1+'&perioada2='+perioada2+'&culori='+culori+'&tari_tip='+tari_tip+'&tari='+tari+'&regiuni_tip='+regiuni_tip+'&regiuni='+regiuni+'&orase_tip='+orase_tip+'&orase='+orase+'&localizare_tip='+localizare_tip+'&nocache = '+nocache);
	http.onreadystatechange = cpFormReply;
	http.send(null);
}
//eof

function cpFormReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('calcpret').innerHTML = response;
	}
}
//eof

//combine select multiple
function combinesel(ob)
 {
  txt='';
  for (var i=0;i<ob.options.length;i++) 
   {
    if (ob.options[i].selected) txt=txt+ob.options[i].value+'|'; 
   } 
  if (txt!='') 
   {
    txt=txt.substr(0,(txt.length-1));
   }
  return txt; 
 }
//eof

//get radio input value
function get_radio_value(ob)
 {
  var txt='';
  for (var i=0; i < ob.length; i++)
   {
    if (ob[i].checked)
     {
      txt= ob[i].value;
     }
   }
  return txt; 
 }
//eof

//search movies fcn
function searchFilme() {
	searchfilme = encodeURIComponent(document.getElementById('searchfilme').value);
	// Set te random number to add to URL request

	document.getElementById('filmesel').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Cautam <strong>" + searchfilme+" ...";
	nocache = Math.random();
	http.open('get', 'ilucs/searchfilme.php?cauta='+searchfilme+'&nocache = '+nocache);
	http.onreadystatechange = searchFilmeReply;
	http.send(null);
}

function searchFilmeReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('filmesel').innerHTML = response;
	}
}
//eof

//add movies
function do_add_filme()
 {
  var strfilme=combinesel(document.getElementById('selfilme'));
  if (strfilme!="")
   {
    strfilme = encodeURIComponent(strfilme);
    oldfilme = encodeURIComponent(document.getElementById('filme').value);
    document.getElementById('filmeshow').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Se incarca ...";
    nocache = Math.random();
    http.open('get', 'ilucs/addfilme.php?strfilme='+strfilme+'&oldfilme='+oldfilme+'&nocache='+nocache);
    http.onreadystatechange = addFilmeReply;
    http.send(null);
   }
 }
function addFilmeReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('filmeshow').innerHTML = response;
	}
}
//eof

//del movies
function do_del_filme(delfilm)
 {
  if (delfilm!="")
   {
    oldfilme = encodeURIComponent(document.getElementById('filme').value);
    document.getElementById('filmeshow').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Se incarca ...";
    nocache = Math.random();
    http.open('get', 'ilucs/delfilme.php?delfilm='+delfilm+'&oldfilme='+oldfilme+'&nocache='+nocache);
    http.onreadystatechange = addFilmeReply;
    http.send(null);
   }
 }
//eof

//search actors fcn
function searchActori() {
	searchactori = encodeURIComponent(document.getElementById('searchactori').value);
	// Set te random number to add to URL request

	document.getElementById('actorisel').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Cautam <strong>" + searchactori+" ...";
	nocache = Math.random();
	http.open('get', 'ilucs/searchactori.php?cauta='+searchactori+'&nocache = '+nocache);
	http.onreadystatechange = searchActoriReply;
	http.send(null);
}

function searchActoriReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('actorisel').innerHTML = response;
	}
}
//eof

//add actori
function do_add_actori()
 {
  var stractori=combinesel(document.getElementById('selactori'));
  if (stractori!="")
   {
    stractori = encodeURIComponent(stractori);
    oldactori = encodeURIComponent(document.getElementById('actori').value);
    document.getElementById('actorishow').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Se incarca ...";
    nocache = Math.random();
    http.open('get', 'ilucs/addactori.php?stractori='+stractori+'&oldactori='+oldactori+'&nocache='+nocache);
    http.onreadystatechange = addActoriReply;
    http.send(null);
   }
 }
function addActoriReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('actorishow').innerHTML = response;
	}
}
//eof

//del actori
function do_del_actori(delactor)
 {
  if (delactor!="")
   {
    oldactori = encodeURIComponent(document.getElementById('actori').value);
    document.getElementById('actorishow').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Se incarca ...";
    nocache = Math.random();
    http.open('get', 'ilucs/delactori.php?delactor='+delactor+'&oldactori='+oldactori+'&nocache='+nocache);
    http.onreadystatechange = addActoriReply;
    http.send(null);
   }
 }
//eof


//search directors fcn
function searchRegizori() {
	searchregizori = encodeURIComponent(document.getElementById('searchregizori').value);
	// Set te random number to add to URL request

	document.getElementById('regizorisel').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Cautam <strong>" + searchregizori+" ...";
	nocache = Math.random();
	http.open('get', 'ilucs/searchregizori.php?cauta='+searchregizori+'&nocache = '+nocache);
	http.onreadystatechange = searchRegizoriReply;
	http.send(null);
}

function searchRegizoriReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('regizorisel').innerHTML = response;
	}
}
//eof

//add regizori
function do_add_regizori()
 {
  var strregizori=combinesel(document.getElementById('selregizori'));
  if (strregizori!="")
   {
    strregizori = encodeURIComponent(strregizori);
    oldregizori = encodeURIComponent(document.getElementById('regizori').value);
    document.getElementById('regizorishow').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Se incarca ...";
    nocache = Math.random();
    http.open('get', 'ilucs/addregizori.php?strregizori='+strregizori+'&oldregizori='+oldregizori+'&nocache='+nocache);
    http.onreadystatechange = addRegizoriReply;
    http.send(null);
   }
 }
function addRegizoriReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('regizorishow').innerHTML = response;
	}
}
//eof

//del regizori
function do_del_regizori(delregizor)
 {
  if (delregizor!="")
   {
    oldregizori = encodeURIComponent(document.getElementById('regizori').value);
    document.getElementById('regizorishow').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Se incarca ...";
    nocache = Math.random();
    http.open('get', 'ilucs/delregizori.php?delregizor='+delregizor+'&oldregizori='+oldregizori+'&nocache='+nocache);
    http.onreadystatechange = addRegizoriReply;
    http.send(null);
   }
 }
//eof

//search regions fcn
function searchRegiuni() {
	searchregiuni = encodeURIComponent(document.getElementById('searchregiuni').value);
	// Set te random number to add to URL request

	document.getElementById('regiunisel').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Cautam <strong>" + searchregiuni+" ...";
	nocache = Math.random();
	http.open('get', 'ilucs/searchregiuni.php?cauta='+searchregiuni+'&nocache = '+nocache);
	http.onreadystatechange = searchRegiuniReply;
	http.send(null);
}

function searchRegiuniReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('regiunisel').innerHTML = response;
	}
}
//eof

//add regiuni
function do_add_regiuni()
 {
  var strregiuni=combinesel(document.getElementById('selregiuni'));
  if (strregiuni!="")
   {
    strregiuni = encodeURIComponent(strregiuni);
    oldregiuni = encodeURIComponent(document.getElementById('regiuni').value);
    document.getElementById('regiunishow').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Se incarca ...";
    nocache = Math.random();
    http.open('get', 'ilucs/addregiuni.php?strregiuni='+strregiuni+'&oldregiuni='+oldregiuni+'&nocache='+nocache);
    http.onreadystatechange = addRegiuniReply;
    http.send(null);
   }
 }
function addRegiuniReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('regiunishow').innerHTML = response;
	}
}
//eof

//del regiuni
function do_del_regiuni(delregiune)
 {
  if (delregiune!="")
   {
    oldregiuni = encodeURIComponent(document.getElementById('regiuni').value);
    document.getElementById('regiunishow').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Se incarca ...";
    nocache = Math.random();
    http.open('get', 'ilucs/delregiuni.php?delregiune='+delregiune+'&oldregiuni='+oldregiuni+'&nocache='+nocache);
    http.onreadystatechange = addRegiuniReply;
    http.send(null);
   }
 }
//eof

//search city fcn
function searchOrase() {
	searchorase = encodeURIComponent(document.getElementById('searchorase').value);
	// Set te random number to add to URL request

	document.getElementById('orasesel').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Cautam <strong>" + searchorase+" ...";
	nocache = Math.random();
	http.open('get', 'ilucs/searchorase.php?cauta='+searchorase+'&nocache = '+nocache);
	http.onreadystatechange = searchOraseReply;
	http.send(null);
}

function searchOraseReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('orasesel').innerHTML = response;
	}
}
//eof

//add orase
function do_add_orase()
 {
  var strorase=combinesel(document.getElementById('selorase'));
  if (strorase!="")
   {
    strorase = encodeURIComponent(strorase);
    oldorase = encodeURIComponent(document.getElementById('orase').value);
    document.getElementById('oraseshow').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Se incarca ...";
    nocache = Math.random();
    http.open('get', 'ilucs/addorase.php?strorase='+strorase+'&oldorase='+oldorase+'&nocache='+nocache);
    http.onreadystatechange = addOraseReply;
    http.send(null);
   }
 }
function addOraseReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('oraseshow').innerHTML = response;
	}
}
//eof

//del orase
function do_del_orase(deloras)
 {
  if (deloras!="")
   {
    oldorase = encodeURIComponent(document.getElementById('orase').value);
    document.getElementById('oraseshow').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Se incarca ...";
    nocache = Math.random();
    http.open('get', 'ilucs/delorase.php?deloras='+deloras+'&oldorase='+oldorase+'&nocache='+nocache);
    http.onreadystatechange = addOraseReply;
    http.send(null);
   }
 }
//eof

function settForm() {
	try {act = encodeURIComponent(document.getElementById('act').value);} catch (e) { act=""; }
 	try {minsecunde = encodeURIComponent(document.getElementById('minsecunde').value);} catch (e) { minsecunde=""; }
 	try {pretsecunda = encodeURIComponent(document.getElementById('pretsecunda').value);} catch (e) { pretsecunda=""; }
 	try {pretzi = encodeURIComponent(document.getElementById('pretzi').value);} catch (e) { pretzi=""; }
 	try {pretgen = encodeURIComponent(document.getElementById('pretgen').value);} catch (e) { pretgen=""; }
 	try {pretactor = encodeURIComponent(document.getElementById('pretactor').value);} catch (e) { pretactor=""; }
 	try {pretregizor = encodeURIComponent(document.getElementById('pretregizor').value);} catch (e) { pretregizor=""; }
 	try {pretvizualizare = encodeURIComponent(document.getElementById('pretvizualizare').value);} catch (e) { pretvizualizare=""; }

	document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
	nocache = Math.random();
	http.open('get', 'ilucs/admin_settings.php?act='+act+'&minsecunde='+minsecunde+'&pretsecunda='+pretsecunda+'&pretzi='+pretzi+'&pretgen='+pretgen+'&pretactor='+pretactor+'&pretregizor='+pretregizor+'&pretvizualizare='+pretvizualizare+'&nocache = '+nocache);
	http.onreadystatechange = settFormReply;
	http.send(null);
}
//eof

function settFormReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('detalii').innerHTML = response;
	}
}
//eof


function addslashes(str) {
str=str.replace(/\'/g,'\\\'');
str=str.replace(/\"/g,'\\"');
str=str.replace(/\\/g,'\\\\');
str=str.replace(/\0/g,'\\0');
return str;
}

//editsub fcn
function editNameq() {
	try {
		try { imdb = encodeURIComponent(document.getElementById('imdb').value); } catch (e) { imdb=""; }
		try { comentariu = encodeURIComponent(document.getElementById('comentariu').value); } catch (e) { comentariu=""; }
		try { traducator = encodeURIComponent(document.getElementById('traducator').value); } catch (e) { traducator=""; }
		try { uploader = encodeURIComponent(document.getElementById('uploader').value); } catch (e) { uploader=""; }
		try { calea = encodeURIComponent(document.getElementById('calea').value); } catch (e) { calea=""; }
		try { release2 = encodeURIComponent(document.getElementById('release2').value); } catch (e) { release2=""; }
		try { parti = encodeURIComponent(document.getElementById('parti').value); } catch (e) { parti=""; }
		try { fps = encodeURIComponent(document.getElementById('fps').value); } catch (e) { fps=""; }
		try { diacritice = encodeURIComponent(document.getElementById('diacritice').value); } catch (e) { diacritice=""; }
		try { tvqs = encodeURIComponent(document.getElementById('tvqs').value); } catch (e) { tvqs=""; }
		try { wsc = encodeURIComponent(document.getElementById('wsc').value); } catch (e) { wsc=""; }
		try { idu = encodeURIComponent(document.getElementById('idu').value); } catch (e) { idu=""; }
		try { nume = encodeURIComponent(document.getElementById('nume').value); } catch (e) { nume=""; }
		try { modifica = encodeURIComponent(document.getElementById('modifica').value); } catch (e) { modifica=""; }
		try { sezo = encodeURIComponent(document.getElementById('sezo').value); } catch (e) { sezo=""; }
		try { vcdq = encodeURIComponent(document.getElementById('vcdq').value); } catch (e) { vcdq=""; }
		try { sincronizator = encodeURIComponent(document.getElementById('sincronizator').value); } catch (e) { sincronizator=""; }
		try { addpic = encodeURIComponent(document.getElementById('addpic').value); } catch (e) { addpic=""; }
		try { addpicbig = encodeURIComponent(document.getElementById('addpicbig').value); } catch (e) { addpicbig=""; }


		release2 = addslashes(release2);
		document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
		nocache = Math.random();
		http.open('get', 'edit.php?imdb='+imdb+'&sezo='+sezo+'&vcdq='+vcdq+'&comentariu='+comentariu+'&addpic='+addpic+'&addpicbig='+addpicbig+'&traducator='+traducator+'&sincronizator='+sincronizator+'&uploader='+uploader+'&calea='+calea+'&release2='+release2+'&parti='+parti+'&fps='+fps+'&diacritice='+diacritice+'&tvqs='+tvqs+'&wsc='+wsc+'&idu='+idu+'&nume='+nume+'&modifica='+modifica+'&nocache = '+nocache);

		http.onreadystatechange = editNameqReply;
		http.send(null);
	} 
	catch (e) { 
		alert (e);
	} 
}

function editNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('detalii').innerHTML = response;
	}
}
//eof

//ttdb fcn
function ttdbNameq() {
	try {
		try { hash = encodeURIComponent(document.getElementById('hash').value); } catch (e) { hash=""; }
		try { size = encodeURIComponent(document.getElementById('size').value); } catch (e) { size=""; }
		try { ebaga = encodeURIComponent(document.getElementById('ebaga').value); } catch (e) { ebaga=""; }
		try { ehash = encodeURIComponent(document.getElementById('ehash').value); } catch (e) { ehash=""; }
		try { ecount = encodeURIComponent(document.getElementById('ecount').value); } catch (e) { ecount=""; }

		document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
		nocache = Math.random();
		http.open('get', 'edit.php?hash='+hash+'&size='+size+'&ebaga='+ebaga+'&ehash='+ehash+'&ecount='+ecount+'&nocache = '+nocache);

		http.onreadystatechange = ttdbNameqReply;
		http.send(null);
	} 
	catch (e) { 
		alert (e);
	} 
}

function ttdbNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('detalii').innerHTML = response;
	}
}
//eof

//contact fcn
function contactNameq() {
	try {
		try { nume = encodeURIComponent(document.getElementById('nume').value); } catch (e) { nume=""; }
		try { prenume = encodeURIComponent(document.getElementById('prenume').value); } catch (e) { prenume=""; }
		try { telefon = encodeURIComponent(document.getElementById('telefon').value); } catch (e) { telefon=""; }
		try { mailfrom = encodeURIComponent(document.getElementById('mailfrom').value); } catch (e) { mailfrom=""; }
		try { mailmsg = encodeURIComponent(document.getElementById('mailmsg').value); } catch (e) { mailmsg=""; }

		document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
		nocache = Math.random();
		http.open('get', 'contact.php?nume='+nume+'&prenume='+prenume+'&telefon='+telefon+'&mailfrom='+mailfrom+'&mailmsg='+mailmsg+'&nocache = '+nocache);

		http.onreadystatechange = contactNameqReply;
		http.send(null);
	} 
	catch (e) { 
		alert (e);
	} 
}

function contactNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('detalii').innerHTML = response;
	}
}
//eof


//contact fcn
function changeNameq() {
	try {
		try { pass = encodeURIComponent(document.getElementById('pass').value); } catch (e) { pass=""; }
		try { pass2 = encodeURIComponent(document.getElementById('pass2').value); } catch (e) { pass2=""; }
		try { idu = encodeURIComponent(document.getElementById('idu').value); } catch (e) { idu=""; }

		document.getElementById('detalii').innerHTML = "<img src=http://www.titrari.tv/images/ajaxloading.gif> Pagina se incarca...";
		nocache = Math.random();
		http.open('get', 'login.php?pass='+pass+'&pass2='+pass2+'&idu='+idu+'&nocache = '+nocache);

		http.onreadystatechange = changeNameqReply;
		http.send(null);
	} 
	catch (e) { 
		alert (e);
	} 
}

function changeNameqReply() {
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('detalii').innerHTML = response;
	}
}
//eof

