function confirmLink(theLink, theCommand) { // Confirmation is not required in the configuration file if (confirmMsg == '') { return true; } var is_confirmed = confirm('Are you sure that you want to:\n' + theCommand); if (is_confirmed) { theLink.href += '&is_js_confirmed=1'; } return is_confirmed; } // end of the 'confirmLink()' function function getObj(name) { if (document.getElementById) { this.obj = document.getElementById(name); this.style = document.getElementById(name).style; } else if (document.all) { this.obj = document.all[name]; this.style = document.all[name].style; } else if (document.layers) { this.obj = document.layers[name]; this.style = document.layers[name]; } } function enableField() { document.edit_collection.photographer.disabled=false; document.edit_collection.img_price.disabled=false; document.edit_collection.img_url.disabled=false; document.edit_collection.max_res.disabled=false; document.edit_collection.keywords.disabled=false; } function genPopup(url, target, width, height) { window.open(url, target, 'width='+width+',height='+height+',toolbar=0,location=0,resizable=yes'); } var popObj; function openPop(strFile,nWidth,nHeight,bStatus,bscroll,btoolbar,blocation,bresize,bdirectories,bmenubar){ popObj = window.open(strFile, "help","toolbar=" + btoolbar + ",location=" + blocation + ",directories=" + bdirectories + ",menubar=" + bmenubar + ",status=" + bStatus + ",scrollbars=" + bscroll +",resizable=" + bresize + ",width=" + nWidth + ",height=" + nHeight); }; function textCounter(field, countfield, maxlimit) { if (field.value.length > maxlimit) // if too long...trim it! field.value = field.value.substring(0, maxlimit); // otherwise, update 'characters left' counter else countfield.value = maxlimit - field.value.length; } var DHTML = (document.getElementById || document.all || document.layers); function getObj(name) { if (document.getElementById) { this.obj = document.getElementById(name); this.style = document.getElementById(name).style; } else if (document.all) { this.obj = document.all[name]; this.style = document.all[name].style; } else if (document.layers) { this.obj = document.layers[name]; this.style = document.layers[name]; } } function show_toolbar(flag) { if (!DHTML) return; var x = new getObj('admin-toolbar'); x.style.display = (flag) ? 'inline' : 'none' } function show_img_edit(flag) { if (!DHTML) return; var x = new getObj('edit-photo'); x.style.display = (flag) ? 'none' : 'inline' } function show_purchase_image(flag) { if (!DHTML) return; var x = new getObj('purchase-image'); x.style.display = (flag) ? 'none' : 'inline' } function show_img_dele(flag) { if (!DHTML) return; var x = new getObj('img-dele'); x.style.display = (flag) ? 'none' : 'inline' } function selectall() { setAllSelect(true); } function deselectall() { setAllSelect(false); } function setAllSelect(state) { var elFrm = document.img_grid; for (var i = 0; i < elFrm.elements.length; i++) { var ourEl = elFrm.elements[i]; if (ourEl.type == "checkbox") if (ourEl.name.indexOf("photoid[]") != -1) ourEl.checked = state; } } function getSelected(){ var elFrm = document.img_grid; var strParams = ""; //If selected, add image Id to the list for (var i = 0; i < elFrm.elements.length; i++) { var ourEl = elFrm.elements[i]; if (ourEl.type == "checkbox") if (ourEl.checked && (ourEl.name.indexOf("photoid[]") != -1)) strParams = strParams + ourEl.value + ","; } //Remove Last delimiter. strParams = strParams.substr(0,strParams.length-1); return strParams; } var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-336494-1']); _gaq.push(['_setDomainName', 'adventuremag.com.br']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();