function check_protx_form(obj){ var my_url = 'http://www.contentmedia.com.pl/ajax_init_protx_payment.php' //show_main_loader('yes'); $('#ajax_loader_indicator').html('Connecting with payment server...'); var query_string = "rel_id="+$('#p_rel_id').val()+"&type="+$('#p_type').val()+"&item_desc="+encodeURIComponent($('#p_item_desc').val())+"&vendortxcode="+$('#p_vendortxcode').val()+"&price="+$('#p_price').val(); $.ajax({ type: "POST", url: my_url, data: query_string, success: function(msg){ if (msg=='ok'){ $('#ajax_loader_indicator').html('Redirecting to PROTX...'); $('#VSPForm').submit(); } else{ //show_main_loader('no'); alert('Unexpected server error. Administrator of this website will check it soon'); return false; } } }); return false; } function text_limit(limit, field, span_field){ if (document.getElementById(field).value.length > limit){ document.getElementById(field).value = document.getElementById(field).value.substring(0, limit); } if(span_field.length > 0){ txt = ""; left_chars = limit - document.getElementById(field).value.length; txt = " " + left_chars + " " + limit + ""; document.getElementById(span_field).innerHTML = txt; } } function check_email(email){ Wzor = /^[0-9a-zA-Z.-_\-]+\@[0-9a-zA-Z.-_\-]+\.[0-9a-zA-Z.]{2,4}$/; if (Wzor.test(email) == false){ return false; } else { return true; } } window_id = ''; function show_image(url){ var divId = createNewWindow(500,500,0,0); window_id = divId; var txt = ''; document.getElementById('windowContent' + divId).innerHTML = txt; } function _change_password(){ if (document.getElementById("password").disabled){ document.getElementById("password").disabled = false; document.getElementById("password2").disabled = false; } else { document.getElementById("password").disabled = true; document.getElementById("password2").disabled = true; } } function findPosX(obj) { var curleft = 0; if (obj.offsetParent) { while (1) { curleft+=obj.offsetLeft; if (!obj.offsetParent) { break; } obj=obj.offsetParent; } } else if (obj.x) { curleft+=obj.x; } return curleft; } function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (1) { curtop+=obj.offsetTop; if (!obj.offsetParent) { break; } obj=obj.offsetParent; } } else if (obj.y) { curtop+=obj.y; } return curtop; } function show_hide_element(id){ h = document.getElementById(""+id+""); h.style.display = (h.style.display == "none") ? "block" : "none"; } function submit_search_form(source){ if (source == 1){ txt = document.getElementById('search_txt'); document.location.href = 'http://www.contentmedia.com.pl/search/'+txt.value+'|1|1'; } else if (source == 2){ txt = document.getElementById('search_txt2'); if (document.getElementById('search_artist').checked || document.getElementById('search_fan').checked){ var art = (document.getElementById('search_artist').checked) ? "1" : "0"; var fan = (document.getElementById('search_fan').checked) ? "1" : "0"; document.location.href = 'http://www.contentmedia.com.pl/search/'+txt.value+'|'+art+'|'+fan+''; } else { alert(''); } } } function lightup(imageobject, opacity){ if (navigator.appName.indexOf("Netscape")!=-1 && parseInt(navigator.appVersion)>=5){ if (imageobject.style.MozOpacity){ imageobject.style.MozOpacity=opacity/100; } else if (imageobject.style.opacity){ imageobject.style.opacity=opacity/100; } } else if (navigator.appName.indexOf("Microsoft")!= -1 && parseInt(navigator.appVersion)>=4){ imageobject.style.filter="alpha(opacity="+opacity+")"; } } function show_description(elid, action){ if(action=="show"){ var obj = document.getElementById(elid); if (obj) obj.style.display = "none"; var obj1 = document.getElementById("l"+elid); if (obj1) obj1.style.display = "block"; }else{ var obj = document.getElementById(elid); if (obj) obj.style.display = "block"; var obj1 = document.getElementById("l"+elid); if (obj1) obj1.style.display = "none"; } } function save_quote(id){ var url = 'http://www.contentmedia.com.pl/ajax_save_quote.php?product='+id+''; new Ajax.Request(url, { method: 'get', onSuccess: function(transport) { if (transport.responseText.match('ok')){ //alert('ok'); } else { //alert('no'); } } }); } /* Function to equal the height of the left and right content - it works on homepage*/ function fixColumns_homepage(){ var h1 = document.getElementById("content_container_homepage").offsetHeight; var h2 = document.getElementById("sidebar").offsetHeight; var max = h1; if(h2 > max) max = h2; /* Set divs to the equal height */ document.getElementById("content_container_homepage").style.height = max + "px"; document.getElementById("sidebar").style.height = max + "px"; } /* Function to equal the height of the left and right content - it works on other pages*/ function fixColumns_other(){ var h1 = document.getElementById("site_content_container_content").offsetHeight; var h2 = document.getElementById("sidebar").offsetHeight; var max = h1; if(h2 > max) max = h2; /* Set divs to the equal height */ document.getElementById("site_content_container_content").style.height = max + "px"; document.getElementById("sidebar").style.height = (max-189) + "px"; } /* Function to equal the height of the left and right content*/ function fixColumns_main(){ var h1 = document.getElementById("main_container_center").offsetHeight; var h2 = document.getElementById("main_container_left").offsetHeight; var max = h1; if(h2 > max) max = h2; /* Set divs to the equal height */ document.getElementById("main_container_center").style.height = max + "px"; document.getElementById("main_container_left").style.height = max + "px"; document.getElementById("main_container_right").style.height = max + "px"; }