document.domain = "ofertino.pl";
var xml_get = new XMLHttpRequest();
var xml_get1 = new XMLHttpRequest();
var comment_xml = new XMLHttpRequest();
var query;
var st;
var sad;
var response;
var json_decoded;
var ch_array = new Array("A","B","C","D","E","F","G","H","I","J");
function quad_get(q,s,sa){
query = q;
st = s;
sad=sa;
xml_get.open("GET", "http://ofertino.pl/preview/as?query="+query+"&page="+st+"&d="+sa);
xml_get.onreadystatechange = quad_transform;
xml_get.send(null);
}
function quad_transform(){
if(xml_get.readyState==4){
var JSON = eval( "(" + xml_get.responseText + ")" );
if(JSON.A.Name!=""){
document.getElementById("A_name").innerHTML = JSON.A.Name;
document.getElementById("A_ulica").innerHTML = JSON.A.Ulica;
document.getElementById("A_miasto").innerHTML = JSON.A.Miasto;
document.getElementById("A_woj").innerHTML = JSON.A.Woj;
document.getElementById("A_oferta").innerHTML = JSON.A.Oferta;
document.getElementById("A_fax").innerHTML = JSON.A.FAX;
document.getElementById("A_tel").innerHTML = JSON.A.TEL;
document.getElementById("A_img").innerHTML = JSON.A.IMG;
document.getElementById("A_comments").innerHTML = JSON.A.COMMENT;
document.getElementById("A_clics").innerHTML = JSON.A.CLIC;
}
if(JSON.B){
document.getElementById("B_name").innerHTML = JSON.B.Name;
document.getElementById("B_ulica").innerHTML = JSON.B.Ulica;
document.getElementById("B_miasto").innerHTML = JSON.B.Miasto;
document.getElementById("B_woj").innerHTML = JSON.B.Woj;
document.getElementById("B_oferta").innerHTML = JSON.B.Oferta;
document.getElementById("B_fax").innerHTML = JSON.B.FAX;
document.getElementById("B_tel").innerHTML = JSON.B.TEL;
document.getElementById("B_img").innerHTML = JSON.B.IMG;
document.getElementById("B_comments").innerHTML = JSON.B.COMMENT;
document.getElementById("B_clics").innerHTML = JSON.B.CLIC;
}
if(JSON.C){
document.getElementById("C_name").innerHTML = JSON.C.Name;
document.getElementById("C_ulica").innerHTML = JSON.C.Ulica;
document.getElementById("C_miasto").innerHTML = JSON.C.Miasto;
document.getElementById("C_woj").innerHTML = JSON.C.Woj;
document.getElementById("C_oferta").innerHTML = JSON.C.Oferta;
document.getElementById("C_fax").innerHTML = JSON.C.FAX;
document.getElementById("C_tel").innerHTML = JSON.C.TEL;
document.getElementById("C_img").innerHTML = JSON.C.IMG;
document.getElementById("C_comments").innerHTML = JSON.C.COMMENT;
document.getElementById("C_clics").innerHTML = JSON.C.CLIC;
}
if(JSON.D){
document.getElementById("D_name").innerHTML = JSON.D.Name;
document.getElementById("D_ulica").innerHTML = JSON.D.Ulica;
document.getElementById("D_miasto").innerHTML = JSON.D.Miasto;
document.getElementById("D_woj").innerHTML = JSON.D.Woj;
document.getElementById("D_oferta").innerHTML = JSON.D.Oferta;
document.getElementById("D_fax").innerHTML = JSON.D.FAX;
document.getElementById("D_tel").innerHTML = JSON.D.TEL;
document.getElementById("D_img").innerHTML = JSON.D.IMG;
document.getElementById("D_comments").innerHTML = JSON.D.COMMENT;
document.getElementById("D_clics").innerHTML = JSON.D.CLIC;
}
if(JSON.E){
document.getElementById("E_name").innerHTML = JSON.E.Name;
document.getElementById("E_ulica").innerHTML = JSON.E.Ulica;
document.getElementById("E_miasto").innerHTML = JSON.E.Miasto;
document.getElementById("E_woj").innerHTML = JSON.E.Woj;
document.getElementById("E_oferta").innerHTML = JSON.E.Oferta;
document.getElementById("E_fax").innerHTML = JSON.E.FAX;
document.getElementById("E_tel").innerHTML = JSON.E.TEL;
document.getElementById("E_img").innerHTML = JSON.E.IMG;
document.getElementById("E_comments").innerHTML = JSON.E.COMMENT;
document.getElementById("E_clics").innerHTML = JSON.E.CLIC;
}
if(JSON.F){
document.getElementById("F_name").innerHTML = JSON.F.Name;
document.getElementById("F_ulica").innerHTML = JSON.F.Ulica;
document.getElementById("F_miasto").innerHTML = JSON.F.Miasto;
document.getElementById("F_woj").innerHTML = JSON.F.Woj;
document.getElementById("F_oferta").innerHTML = JSON.F.Oferta;
document.getElementById("F_fax").innerHTML = JSON.F.FAX;
document.getElementById("F_tel").innerHTML = JSON.F.TEL;
document.getElementById("F_img").innerHTML = JSON.F.IMG;
document.getElementById("F_comments").innerHTML = JSON.F.COMMENT;
document.getElementById("F_clics").innerHTML = JSON.F.CLIC;
}
if(JSON.G){
document.getElementById("G_name").innerHTML = JSON.G.Name;
document.getElementById("G_ulica").innerHTML = JSON.G.Ulica;
document.getElementById("G_miasto").innerHTML = JSON.G.Miasto;
document.getElementById("G_woj").innerHTML = JSON.G.Woj;
document.getElementById("G_oferta").innerHTML = JSON.G.Oferta;
document.getElementById("G_fax").innerHTML = JSON.G.FAX;
document.getElementById("G_tel").innerHTML = JSON.G.TEL;
document.getElementById("G_img").innerHTML = JSON.G.IMG;
document.getElementById("G_comments").innerHTML = JSON.G.COMMENT;
document.getElementById("G_clics").innerHTML = JSON.G.CLIC;
}
if(JSON.H){
document.getElementById("H_name").innerHTML = JSON.H.Name;
document.getElementById("H_ulica").innerHTML = JSON.H.Ulica;
document.getElementById("H_miasto").innerHTML = JSON.H.Miasto;
document.getElementById("H_woj").innerHTML = JSON.H.Woj;
document.getElementById("H_oferta").innerHTML = JSON.H.Oferta;
document.getElementById("H_fax").innerHTML = JSON.H.FAX;
document.getElementById("H_tel").innerHTML = JSON.H.TEL;
document.getElementById("H_img").innerHTML = JSON.H.IMG;
document.getElementById("H_comments").innerHTML = JSON.H.COMMENT;
document.getElementById("H_clics").innerHTML = JSON.H.CLIC;
}
if(JSON.I){
document.getElementById("I_name").innerHTML = JSON.I.Name;
document.getElementById("I_ulica").innerHTML = JSON.I.Ulica;
document.getElementById("I_miasto").innerHTML = JSON.I.Miasto;
document.getElementById("I_woj").innerHTML = JSON.I.Woj;
document.getElementById("I_oferta").innerHTML = JSON.I.Oferta;
document.getElementById("I_fax").innerHTML = JSON.I.FAX;
document.getElementById("I_tel").innerHTML = JSON.I.TEL;
document.getElementById("I_img").innerHTML = JSON.I.IMG;
document.getElementById("I_comments").innerHTML = JSON.I.COMMENT;
document.getElementById("I_clics").innerHTML = JSON.I.CLIC;
}
if(JSON.J){
document.getElementById("J_name").innerHTML = JSON.J.Name;
document.getElementById("J_ulica").innerHTML = JSON.J.Ulica;
document.getElementById("J_miasto").innerHTML = JSON.J.Miasto;
document.getElementById("J_woj").innerHTML = JSON.J.Woj;
document.getElementById("J_oferta").innerHTML = JSON.J.Oferta;
document.getElementById("J_fax").innerHTML = JSON.J.FAX;
document.getElementById("J_tel").innerHTML = JSON.J.TEL;
document.getElementById("J_img").innerHTML = JSON.J.IMG;
document.getElementById("J_comments").innerHTML = JSON.J.COMMENT;
document.getElementById("J_clics").innerHTML = JSON.J.CLIC;
}
xml_get1.open("GET", "http://ofertino.pl/preview/as/panel.php?q="+query+"&st="+st+"&markt="+JSON.K+"&sad="+sad);
xml_get1.onreadystatechange = function(){if(xml_get1.readyState==4){document.getElementById("panel_i").innerHTML = xml_get1.responseText;}};
xml_get1.send(null);
tafels(JSON.K);
document.getElementById('mapa_stat').src = JSON.L;
animate_scrool();
document.getElementById('put_in').style.display='none';
}
}
function animate_scrool(){
for(var i=999;i>1;i-=10){
setTimeout("window.scrollBy(0,-"+i/10+");",i);
}
}
function tafels(id){
if(id==1){
$('#A_style').show("slow");
$('#B_style').hide("slow");
$('#C_style').hide("slow");
$('#D_style').hide("slow");
$('#E_style').hide("slow");
$('#F_style').hide("slow");
$('#G_style').hide("slow");
$('#H_style').hide("slow");
$('#I_style').hide("slow");
$('#J_style').hide("slow");
}
if(id==2){
$('#A_style').show("slow");
$('#B_style').show("slow");
$('#C_style').hide("slow");
$('#D_style').hide("slow");
$('#E_style').hide("slow");
$('#F_style').hide("slow");
$('#G_style').hide("slow");
$('#H_style').hide("slow");
$('#I_style').hide("slow");
$('#J_style').hide("slow");
}
if(id==3){
$('#A_style').show("slow");
$('#B_style').show("slow");
$('#C_style').show("slow");
$('#D_style').hide("slow");
$('#E_style').hide("slow");
$('#F_style').hide("slow");
$('#G_style').hide("slow");
$('#H_style').hide("slow");
$('#I_style').hide("slow");
$('#J_style').hide("slow");
}
if(id==4){
$('#A_style').show("slow");
$('#B_style').show("slow");
$('#C_style').show("slow");
$('#D_style').show("slow");
$('#E_style').hide("slow");
$('#F_style').hide("slow");
$('#G_style').hide("slow");
$('#H_style').hide("slow");
$('#I_style').hide("slow");
$('#J_style').hide("slow");}
if(id==5){
$('#A_style').show("slow");
$('#B_style').show("slow");
$('#C_style').show("slow");
$('#D_style').show("slow");
$('#E_style').show("slow");
$('#F_style').hide("slow");
$('#G_style').hide("slow");
$('#H_style').hide("slow");
$('#I_style').hide("slow");
$('#J_style').hide("slow");
}
if(id==6){
$('#A_style').show("slow");
$('#B_style').show("slow");
$('#C_style').show("slow");
$('#D_style').show("slow");
$('#E_style').show("slow");
$('#F_style').show("slow");
$('#G_style').hide("slow");
$('#H_style').hide("slow");
$('#I_style').hide("slow");
$('#J_style').hide("slow");
}
if(id==7){
$('#A_style').show("slow");
$('#B_style').show("slow");
$('#C_style').show("slow");
$('#D_style').show("slow");
$('#E_style').show("slow");
$('#F_style').show("slow");
$('#G_style').show("slow");
$('#H_style').hide("slow");
$('#I_style').hide("slow");
$('#J_style').hide("slow");
}
if(id==8){
$('#A_style').show("slow");
$('#B_style').show("slow");
$('#C_style').show("slow");
$('#D_style').show("slow");
$('#E_style').show("slow");
$('#F_style').show("slow");
$('#G_style').show("slow");
$('#H_style').show("slow");
$('#I_style').hide("slow");
$('#J_style').hide("slow");
}
if(id==9){
$('#A_style').show("slow");
$('#B_style').show("slow");
$('#C_style').show("slow");
$('#D_style').show("slow");
$('#E_style').show("slow");
$('#F_style').show("slow");
$('#G_style').show("slow");
$('#H_style').show("slow");
$('#I_style').show("slow");
$('#J_style').hide("slow");
}
if(id==10){
$('#A_style').show("slow");
$('#B_style').show("slow");
$('#C_style').show("slow");
$('#D_style').show("slow");
$('#E_style').show("slow");
$('#F_style').show("slow");
$('#G_style').show("slow");
$('#H_style').show("slow");
$('#I_style').show("slow");
$('#J_style').show("slow");
}
}
var ctrl_insert = 0;
function opinion_form_open(){
var body_el = document.getElementById('body_el');
body_el.style.opacity = 0.7;
body_el.style.display="";
var form_el = document.getElementById('opinion_form');
form_el.style.display="";
}
function opinion_form_close(){
var body_el = document.getElementById('body_el');
body_el.style.opacity = 0;
body_el.style.display="none";
var form_el = document.getElementById('opinion_form');
form_el.style.display="none";
}
function show_options(){
var g = document.getElementById('options_f');
var g_a = document.getElementById('options_f_a');
g.style.display = "";
g_a.style.display="";
}
function ofert_show_all(){
var a = document.getElementsByClassName('turbo');
var b = document.getElementsByClassName('turbo2');
a.style.display="";
b.style.display="none";
}
function ofert_min_all(){
var a = document.getElementsByClassName('turbo');
var b = document.getElementsByClassName('turbo2');
var a2 = Array.filter( a, function(elem){
return Array.indexOf( a, elem.parentNode ) > -1;
});
alert(a2[0]);
a.style.display="none";
b.style.display="";
}
function ofert_sub(id,word,word2){
var o = document.getElementById(id);
var t = strpos(o.innerHTML,word);
if(t>30){
if(o.innerHTML.length>200){
var i = strpos(o.innerHTML,' ',200);
o.innerHTML = "..." + o.innerHTML.substr(t-(word.length),i-1)+"...";
}else{
o.onmouseover="";
}
}
if(word2){
var t2 = strpos(o.innerHTML,word2);
if(t2>30){
if(o.innerHTML.length>200){
var i = strpos(o.innerHTML,' ',200);
o.innerHTML = "..." + o.innerHTML.substr(t2-(word2.length),i-1)+"...";
}else{
o.onmouseover="";
}
}
}
if(t<5||t2<5){
if(o.innerHTML.length>200){
var i = strpos(o.innerHTML,' ',200);
o.innerHTML = o.innerHTML.substr(0,i-1)+"...";
}else{
o.onmouseover="";
}
}
}
function ofert_tmp(id,id2){
var o = document.getElementById(id);
var b = document.getElementById(id2);
b.innerHTML=o.innerHTML;
document.getElementById(id2).onmouseover ="";
}
function strpos (haystack, needle, offset) {
var i = (haystack + '').indexOf(needle, (offset || 0));
return i === -1 ? false : i;
}
function getXmlHttpRequestObject() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
} else if(window.ActiveXObject) {
return new ActiveXObject("MSXML2.XMLHTTP.5.0");
} else {
alert("Twoja przeglądarka wymaga aktualizacji do nowszej wersji!");
}
}
function put_in(){
var silver = document.getElementById('silver');
var textBox = document.getElementById('txtSearch');
textBox.value = silver.value;
if(textBox.value!=""){
document.getElementById('load_put').innerHTML = '
';
textBox.value = textBox.value.replace("q","");
silver.value = silver.value.replace("q","");
document.getElementById('frmSearch').submit();
}
}
function voice_search_chrome_beta(){
document.getElementById("search_text").style.display="none";document.getElementById("search_speech").style.display="";
}
function put_into_silver(){
}
function put_out_silver(){
}
function ie9_el(){
var body_el1 = document.getElementById('body_el1');
var body_el2 = document.getElementById('body_el2');
var body_el3 = document.getElementById('body_el3');
var body_el4 = document.getElementById('body_el4');
body_el1.style.width = "90%";
body_el2.style.width = "90%";
body_el3.style.width = "90%";
body_el4.style.width = "90%";
}
function cancel_error_form_off(){
var body_el = document.getElementById('body_el');
body_el.style.opacity = 0;
body_el.style.display="none";
var form_el = document.getElementById('error_form');
form_el.style.display="none";
//var ads_el = document.getElementById('ads_top');
//ads_el.style.display="";
}
function comment_form_close(typ,id){
if(typ=="tak"){
var body_el = document.getElementById('body_el');
body_el.style.opacity = 0;
body_el.style.display="none";
var form_el = document.getElementById('comment_form');
form_el.style.display="none";
window.close();
///var ads_el = document.getElementById('ads_top');
//ads_el.style.display="";
}else{
var body_el = document.getElementById('body_el');
body_el.style.opacity = 0;
body_el.style.display="none";
var form_el = document.getElementById('comment_form');
form_el.style.display="none";
//var ads_el = document.getElementById('ads_top');
//ads_el.style.display="";
}
}
function comment_form_open(){
var body_el = document.getElementById('body_el');
body_el.style.opacity = 0.7;
body_el.style.display="";
var form_el = document.getElementById('comment_form');
form_el.style.display="";
//var ads_el = document.getElementById('ads_top');
//ads_el.style.display="none";
}
function card_form_open(){
var body_el = document.getElementById('body_el');
body_el.style.opacity = 0.7;
body_el.style.display="";
var form_el = document.getElementById('card_form');
form_el.style.display="";
//var ads_el = document.getElementById('ads_top');
//ads_el.style.display="none";
}
function card_form_close(){
var body_el = document.getElementById('body_el');
body_el.style.opacity = 0;
body_el.style.display="none";
var form_el = document.getElementById('card_form');
form_el.style.display="none";
//var ads_el = document.getElementById('ads_top');
//ads_el.style.display="";
}
function error_frame_thanks(){
var thank_el = document.getElementById('error_frame');
thank_el.style.display="none";
var thanks_el = document.getElementById('error_form_thanks');
thanks_el.style.display="";
}
function cancel_error_form_on(){
var body_el = document.getElementById('body_el');
body_el.style.opacity = 0.7;
body_el.style.display="";
var form_el = document.getElementById('error_form');
form_el.style.display="";
//var ads_el = document.getElementById('ads_top');
//ads_el.style.display="none";
}
function el(){
var body_el = document.getElementById('body_el');
body_el.style.width = "1580px";
body_el.style.height = "900px";
var form_el = document.getElementById('error_form');
form_el.style.top = (window.innerHeight/7)+"px";
form_el.style.left = (window.innerWidth/8)+"px";
}
function login_form_off(){
$("#card_text").hide("slow");
$("#card_option").show("slow");
}
function login_form_on(){
$.ajax({
url: "http://ofertino.pl/form/login_form_tmpl.php",
cache:false,
success: function(data){
$("#card_text").css("display","none");
$("#card_text").html(data);
$("#card_text").show("slow");
$("#card_option").hide("slow");
}
});
}
function register_form_off(){
$("#card_text").hide("slow");
$("#card_option").show("slow");
}
function register_form_on(){
$.ajax({
url: "http://ofertino.pl/form/register_form_tmpl.html",
cache:false,
success: function(data){
$("#card_text").css("display","none");
$("#card_text").html(data);
$("#card_text").show("slow");
$("#card_option").hide("slow");
}
});
}
function el_register(){
var body_el = document.getElementById('body_el');
body_el.style.width = (window.innerWidth)+"px";
body_el.style.height = (window.innerHeight)+"px";
var form_el = document.getElementById('register_form');
form_el.style.top = (window.innerHeight/7)+"px";
form_el.style.left = (window.innerWidth/8)+"px";
}
function el_login(){
var body_el = document.getElementById('body_el');
body_el.style.width = (window.innerWidth)+"px";
body_el.style.height = (window.innerHeight)+"px";
var form_el = document.getElementById('login_form');
form_el.style.top = (window.innerHeight/7)+"px";
form_el.style.left = (window.innerWidth/8)+"px";
}
function ajax_img(id){
var idm=new Array();
idm=id.split(",");
for(var i=0;i<11;i++){
setTimeout("start("+idm[i]+")",(i+1)*200);
}
}
function ajax_search(st){
var doc = document.getElementById('ajax_search');
var query = document.getElementById('txtSearch').value;
var query2 = document.getElementById('silver').value;
var ads = document.getElementById('ads_u');
if(query2!=""){
query=query2;
}
}
function show_ads(){
var query = document.getElementById('txtSearch').value;
if(query==""){
query = document.getElementById('silver').value;
}
if(query.length>3){
document.getElementById('body_el').style.display="";
document.location = "/"+query+",0,1,A.html";
}
}
function star(o,id){
http=new XMLHttpRequest();
http.open("GET", "http://ofertino.pl/ocena/id.php?id="+id+"&ocena="+o, false);
http.onreadystatechange = function () {
if (http.readyState==4) {
document.getElementById('comm').innerHTML="Dziękujemy!";
}
}
http.send(null);
}
function start(id){
http=new XMLHttpRequest();
var url = document.getElementById('ajaximg_'+id).alt;
url=url.replace("http://","");
url=url.replace("/","");
var docaj = document.getElementById('ajaximg_'+id);
http.open("GET", "http://ofertino.pl/min/401.php?url="+url+"&size=small", true);
http.onreadystatechange = function () {
if (http.readyState==4) {
if(http.status==200){
docaj.src=http.responseText;
}else{
if(http.status==404){
create(url,id);
}else{
docaj.src = http.status;
}
}
}
}
http.send(null);
}
function create(url,id){
xmlhtps=new XMLHttpRequest();
var docaj = document.getElementById('ajaximg_'+id);
docaj.src = 'http://src.ofertino.pl/w1/loadingo.gif';
xmlhtps.open("GET", "http://ofertino.pl/min/404.php?url="+url+"&size=small", true);
xmlhtps.onreadystatechange = function () {
if (xmlhtps.readyState == 4) {
docaj.src=xmlhtps.responseText;
}
}
xmlhtps.send(null);
}
function wiz_box(q,st){
xmlhttps=new XMLHttpRequest();
var doc = document.getElementById('messer');
doc.innerHTML = '
 | Ładowanie... |
';
xmlhttps.open("GET", "http://ofertino.pl/sear.php?q="+q+"&st="+st, true);
xmlhttps.onreadystatechange = function () {
if (xmlhttps.readyState == 4) {
var str = xmlhttps.responseText;
doc.innerHTML=str;
}
}
xmlhttps.send(null);
}
sld=false;
slid=false;
slide=false;
slider=false;
sliderm=false;
function slide1(wht){
var m = document.getElementById(wht);
if(sld==false) {
m.style.display = "block";
sld=true;
}else{m.style.display = "none";sld=false;}
}
function slide2(wht){
var m = document.getElementById(wht);
if(slid==false) {
m.style.display = "block";
slid=true;
}else{m.style.display = "none";slid=false;}
}
function slide3(wht){
var m = document.getElementById(wht);
if(slide==false) {
m.style.display = "block";
slide=true;
}else{m.style.display = "none";slide=false;}
}
function slide4(wht){
var m = document.getElementById(wht);
if(slider==false) {
m.style.display = "block";
slider=true;
}else{m.style.display = "none";slider=false;}
}
function slide5(wht){
var m = document.getElementById(wht);
if(sliderm==false) {
m.style.display = "block";
sliderm=true;
}else{m.style.display = "none";sliderm=false;}
}
var xmlhttps=getXmlHttpRequestObject();
function GetDescription(id){
var doc = document.getElementById('v_'+id);
doc.innerHTML='';
doc.innerHTML = ' | Ładowanie... |
';
xmlhttps.open("GET", 'http://ofertino.pl/desc.php?id=' + id, true);
xmlhttps.onreadystatechange = function () {
if (xmlhttps.readyState == 4) {
var str = xmlhttps.responseText;
doc.innerHTML=str;
}
}
xmlhttps.send(null);
}
var xmlhttpp=getXmlHttpRequestObject();
function getWiz(query){
var doc = document.getElementById('getWiz');
doc.innerHTML='';
doc.innerHTML = ' | Ładowanie... |
';
xmlhttpp.open("GET", 'http://ofertino.pl/sear.php?q='+query, true);
xmlhttpp.onreadystatechange = function () {
if (xmlhttpp.readyState == 4) {
var str = xmlhttpp.responseText;
doc.innerHTML=str;
}
}
xmlhttpp.send(null);
}
function GetForm(){
var doc = document.getElementById('table_all');
doc.innerHTML='';
doc.innerHTML = ' | Ładowanie... |
';
xmlhttpp.open("GET", 'http://ofertino.pl/ofert.php', true);
xmlhttpp.onreadystatechange = function () {
if (xmlhttpp.readyState == 4) {
var str = xmlhttpp.responseText;
doc.innerHTML=str;
}
}
xmlhttpp.send(null);
}
function Clic(id){
xmlhttpp.open("GET", 'http://ofertino.pl/clic.php?qw&cid='+id);
xmlhttpp.onreadystatechange = function () {
return true;
}
xmlhttpp.send(null);
}
function chng(id){
if(id==1){
var v_93722 = document.getElementById('v_93722');
zero('edit','options','login','edi','opt');
v_93722.innerHTML="Start->Edycja";
}
if(id==2){
var v_93722 = document.getElementById('v_93722');
zero('options','edit','login','opt','edi');
v_93722.innerHTML="Start->Opcje";
}
}
var xmlhttp=aaGetXmlHttpRequest();
function startUpload(){
document.getElementById('f1_upload_process').style.display = 'block';
document.getElementById('f1_upload_form').style.visibility = 'hidden';
document.getElementById('send').disabled = 'disabled';
document.getElementById('send').value = 'Przesyłanie obrazów';
document.getElementById('send').style.width = '200px';
return true;
}
function stopUpload(success,foto,scaled,obraz){
var result = '';
if (success == 1){
result = 'Plik został załadowany!<\/span>';
}
else {
result = 'Błąd podczas uploadowania pliku!<\/span>
';
}
var xx = '';
document.getElementById('pci_0').value = obraz;
if(scaled == 1) { var xx='width=150 height=100'; } else { var xx = ''; }
document.getElementById('f1_upload_process').style.display = 'none';
document.getElementById('pictures').innerHTML += '1. | ';
document.getElementById('f1_upload_form').style.display = 'none';
document.getElementById('send').value = 'Dodaj Firmę';
document.getElementById('send').style.width = '200px';
document.getElementById('send').disabled = '';
return true;
}
function startUpload1(){
document.getElementById('f1_upload_process_1').style.display = 'block';
document.getElementById('f1_upload_form_1').style.visibility = 'hidden';
return true;
}
function stopUpload1(success,foto,scaled,obraz){
var result = '';
if (success == 1){
result = 'Plik został załadowany!<\/span>';
}
else {
result = 'Błąd podczas uploadowania pliku!<\/span>
';
}
document.getElementById('pci_1').value = obraz;
var xx = '';
if(scaled == 1) { var xx='width=150 height=100'; } else { var xx = ''; }
document.getElementById('f1_upload_process_1').style.display = 'none';
document.getElementById('pict').innerHTML += '2. | ';
document.getElementById('f1_upload_form_1').style.display = 'none';
return true;
}
function showEvnt(evnt) {
xmlhttp.open('GET', evnt, true);
xmlhttp.onreadystatechange = aer;
xmlhttp.send("s");
}
function aer() {
if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
}
}
var xmlhttp=aaGetXmlHttpRequest();
function image () {
var x = screen.width/2;
for(i=0;i= 6) return false;
} else {
return false;
}
return true;
}
function aaGetStyle(obj, styleName) {
if (obj.currentStyle)
return obj.currentStyle[styleName];
else if (document.defaultView && document.defaultView.getComputedStyle)
return document.defaultView.getComputedStyle(obj,null).getPropertyValue(styleName);
return undefined;
}
function aaManageEvent(eventObj, event, eventHandler) {
if (eventObj.addEventListener) {
eventObj.addEventListener(event, eventHandler,false);
} else if (eventObj.attachEvent) {
event = "on" + event;
eventObj.attachEvent(event, eventHandler);
}
}
function aaCancelEvent(event) {
if (event.preventDefault) {
event.preventDefault();
event.stopPropagation();
} else {
event.returnValue = false;
event.cancelBubble = true;
}
}
function aaStopEvent(eventObj,event,eventHandler) {
if (eventObj.removeEventListener) {
eventObj.removeEventListener(event,eventHandler,false);
} else if (eventObj.detachEvent) {
event = "on" + event;
eventObj.detachEvent(event,getKey);
}
}
function aaElem(identifier) {
return document.getElementById(identifier);
}
function aaAddScript(url) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
document.getElementsByTagName('head')[0].appendChild(script);
}
function aaBindEventListener(obj, method) {
return function(event) { method.call(obj, event || window.event)};
}
function aaBindObjMethod(obj, method) {
return function() { method.apply(obj, arguments); }
}
function externalLinks() {
var anchors = document.getElementsByTagName("a");
for (var i=0; i';
}
if(str.replace(' ','') !== '') {
searchReq.open("GET", 'http://ofertino.pl/base.php?search=' + str.replace(/%20/g,"*00*"), true);
searchReq.onreadystatechange = handleSearchSuggest;
searchReq.send(null);
//var ads_top = document.getElementById('ads_top');
//ads_top.style.display="none";
}
}
function searchSuggest_adresy() {
var str = escape(document.getElementById('txtSearch').value);
if(str==''){
setSearch('');
}
if(str!==''){
var ss = document.getElementById('search_suggest');
ss.style.display='';
ss.innerHTML = ' | Ładowanie... |
';
}
if(str.replace(' ','') !== '') {
searchReq.open("GET", 'http://adresy.ofertino.pl/base_ie.php?search=' + str.replace(/%20/g,"*00*"), true);
searchReq.onreadystatechange = handleSearchSuggest;
searchReq.send(null);
var ads_top = document.getElementById('ads_top');
ads_top.style.display="none";
}
}
function handleSearchSuggest() {
if (searchReq.readyState == 4) {
var ss = document.getElementById('put_in');
ss.style.visibility='hidden';
var t = 0;
var str = searchReq.responseText.split(":");
var qu = searchReq.responseText.split("*");
quad_get(str[0],0,"Polska");
}
}
var sl5;
var time = 1000;
var ltime=0;
function show_ads_check(){
if(ltime>time){
setTimeout("show_ads()",time);
ltime=0;
}
}
function ttime(){
ltime=0;
}
function show_ads_p(i){
ltime=i;
if(ltime>1000){
setTimeout("show_ads()",time);
}
}
function searchSuggest1() {
if(document.getElementById('txtSearch').value==''){
document.getElementById('silver').value='';
}
if(document.getElementById('silver').value!==document.getElementById('txtSearch').value){
document.getElementById('silver').value='';
}
sl5=false;
var str = escape(document.getElementById('txtSearch').value);
if(str==''){
setSearch('');
}
document.getElementById('put_in').style.visibility="";
ctrl_insert=1;
searchReq.open("GET", 'http://ofertino.pl/base.php?search=' + str.replace(/%20/g,"*00*"), true);
searchReq.onreadystatechange = handleSearchSuggest1;
searchReq.send(null);
}
function stristr (haystack, needle, bool) {
var pos = 0;
haystack += '';
pos = haystack.toLowerCase().indexOf( (needle+'').toLowerCase() );
if (pos == -1){
return false;
} else{
if (bool) {
return haystack.substr( 0, pos );
} else{
return haystack.slice( pos );
}
}
}
function stripos ( f_haystack, f_needle ){
var haystack = (f_haystack+'').toLowerCase();
var needle = (f_needle+'').toLowerCase();
var index = 0;
var f_offset=0;
if ((index = haystack.indexOf(needle, f_offset)) !== -1) {
return true;
}
return false;
}
function handleSearchSuggest1() {
if (searchReq.readyState == 4) {
sl5=false;
var v = document.getElementById('txtSearch').value;
var str = searchReq.responseText.split(":");
if(stripos(searchReq.responseText,';')!==false){
var mtr = true;
}
var qu = searchReq.responseText.split("*");
var zxc = escape(document.getElementById('txtSearch').value);
if(stristr(str[0],v)){
var uip=stristr(str[0],v).replace("","");
var uip=uip.replace(//gi,"");
document.getElementById('silver').value=uip.toLowerCase();
quad_get(uip.toLowerCase(),'0');
sl5=true;
if(document.getElementById('txtSearch').value==document.getElementById('silver').value){
document.getElementById('silver').value='';
}
}
if(str[0] !== document.getElementById('txtSearch').value) {
for(i=0; i < str.length - 1; i++) {
if(i==3){
if(mtr==true){
ss.innerHTML += "";
}
}
var suggest = '","");
aaa = aaa.replace("
","");
aaa = aaa.replace('','');
aaa = aaa.replace('','');
aaa = aaa.replace("","");
suggest += 'class="suggest_link"> ';
}
}}
ajax_search("0");
}
function suggestOver(div_value) {
div_value.className = 'suggest_link_over';
}
function suggestOut(div_value) {
div_value.className = 'suggest_link';
}
function suggest_close(div_value) {
var ss = document.getElementById('search_suggest');
ss.style.display='none';
div_value.style.display="none";
}
function setSearch(value) {
var textBox = document.getElementById('txtSearch');
if(textBox.value!=""){
setTimeout("document.getElementById('frmSearch').submit();",100);
}
var aaa = value;
aaa = aaa.replace("","");
aaa = aaa.replace("","");
document.getElementById('txtSearch').value = aaa;
document.getElementById('search_suggest').style.display = 'none';
document.getElementById('silver').value = '';
var ss = document.getElementById('search_suggest')
ss.style.display='none';
}
function close_suggest() {
var hid = document.getElementById("suggest_l");
hid.style.display = "none";
var swe = document.getElementById("suggest_m");
swe.innerHTML = "Otworz";
}
function open_suggest() {
var op = document.getElementById("suggest_l");
op.style.display = "block";
var swe = document.getElementById("suggest_m");
swe.innerHTML = "Zamknij";
}
function woj() {
var wo = document.getElementById("q_1");
var woj = document.getElementById("woj").value;
wo.value = woj;
}
function bigger() {
eco = document.getElementById("img_o");
eco.height = "300";
eco.width = "300";
}
function smaller() {
eco = document.getElementById("img_o");
eco.height = "100";
eco.width = "100";
}
function closet() {
eco = document.getElementById("123");
eco.style.display = "none";
pl = document.getElementById("p");
pl.innerHTML = "Opcje";
}
function opent() {
eco = document.getElementById("123");
eco.style.display = "block";
pl = document.getElementById("p");
pl.innerHTML = "Zamknij";
}
function closer() {
eco1 = document.getElementById("openr");
eco1.style.display = "none";
}
function openr() {
eco1 = document.getElementById("openr");
eco1.style.display = "block";
}
function hideo() {
hide = document.getElementById("more");
hide.style.display = "none";
ud = document.getElementById("piskle");
ud.innerHTML = "Wiecej";
}
var comment_click = 0;
function comment_frame_open(){
if(comment_click ==0){
$('#comment_frame_no_content').hide("fast");
$('#comment_frame').show("slow");
comment_click = 1;
}else{
var comment_id = document.getElementById('comment_id').value;
var comment_name = document.getElementById('comment_name').value;
var comment_type = document.getElementById('comment_type').options[document.getElementById('comment_type').selectedIndex].value;
var comment_text = document.getElementById('comment_text').value;
comment_xml.open("GET", 'http://adresy.ofertino.pl/comment_save.php?id='+comment_id+'&get=0&name='+comment_name+'&type='+comment_type+'&comment='+comment_text+'', true);
comment_xml.onreadystatechange = function(){
if(comment_xml.responseText == "DONE"){
$('#comment_new_name').html("~"+comment_name);
$('#comment_new_text').html(comment_text);
if(comment_type == "Pozytywny"){
$('#comment_new').css("background","#8AFF90");
}else{
$('#comment_new').css("background","#FFCCCC");
}
$('#comment_new').show("slow");
}else{
$('#comment_new').css("background","#F5F5F5");
$('#comment_new_name').html("Wystąpił błąd! Code:Ax01");
$('#comment_new').show("slow");
}
}
comment_xml.send(null);
}
}
function comment_books_frame_open(){
if(comment_click ==0){
$('#comment_frame_no_content').hide("fast");
$('#comment_frame').show("slow");
comment_click = 1;
}else{
var comment_id = document.getElementById('comment_id').value;
var comment_name = document.getElementById('comment_name').value;
var comment_type = document.getElementById('comment_type').options[document.getElementById('comment_type').selectedIndex].value;
var comment_text = document.getElementById('comment_text').value;
comment_xml.open("GET", 'http://books.ofertino.pl/comment_save.php?id='+comment_id+'&get=0&name='+comment_name+'&type='+comment_type+'&comment='+comment_text+'', true);
comment_xml.onreadystatechange = function(){
if(comment_xml.responseText == "DONE"){
$('#comment_new_name').html("~"+comment_name);
$('#comment_new_text').html(comment_text);
if(comment_type == "Pozytywny"){
$('#comment_new').css("background","#8AFF90");
}else{
$('#comment_new').css("background","#FFCCCC");
}
$('#comment_new').show("slow");
}else{
$('#comment_new').css("background","#F5F5F5");
$('#comment_new_name').html("Wystąpił błąd! Code:Ax01");
$('#comment_new').show("slow");
}
}
comment_xml.send(null);
}
}
function comment_recipes_frame_open(){
if(comment_click ==0){
$('#comment_frame_no_content').hide("fast");
$('#comment_frame').show("slow");
comment_click = 1;
}else{
var comment_id = document.getElementById('comment_id').value;
var comment_name = document.getElementById('comment_name').value;
var comment_type = document.getElementById('comment_type').options[document.getElementById('comment_type').selectedIndex].value;
var comment_text = document.getElementById('comment_text').value;
comment_xml.open("GET", 'http://przepisy.ofertino.pl/comment_save.php?id='+comment_id+'&get=0&name='+comment_name+'&type='+comment_type+'&comment='+comment_text+'', true);
comment_xml.onreadystatechange = function(){
if(comment_xml.responseText == "DONE"){
$('#comment_new_name').html("~"+comment_name);
$('#comment_new_text').html(comment_text);
if(comment_type == "Pozytywny"){
$('#comment_new').css("background","#8AFF90");
}else{
$('#comment_new').css("background","#FFCCCC");
}
$('#comment_new').show("slow");
}else{
$('#comment_new').css("background","#F5F5F5");
$('#comment_new_name').html("Wystąpił błąd! Code:Ax01");
$('#comment_new').show("slow");
}
}
comment_xml.send(null);
}
}
function more() {
more = document.getElementById("more");
more.style.display = "block";
at = document.getElementById("piskle");
at.innerHTML = "Zamknij";
}
function captcha_check_act(){
var res = document.getElementById('t').value;
var cha = document.getElementById('token').value;
var x = new XMLHttpRequest();
x.open("GET", "http://adresy.ofertino.pl/captcha_verify_1.php?kod="+res+"&token="+cha+"&actm=1", false);
document.getElementById('sopel').innerHTML = "
";
x.onreadystatechange = function () {
if (x.readyState==4) {
document.getElementById('sopel').innerHTML = x.responseText;
}
}
x.send(null);
}
function captcha_check(){
var res = document.getElementById('t').value;
var cha = document.getElementById('token').value;
var x = new XMLHttpRequest();
x.open("GET", "http://ofertino.pl/captcha_verify_1.php?kod="+res+"&token="+cha, false);
document.getElementById('sopel').innerHTML = "
";
x.onreadystatechange = function () {
if (x.readyState==4) {
document.getElementById('sopel').innerHTML = x.responseText;
}
}
x.send(null);
}