﻿function VeriSignValidation(){var href = "https://seal.verisign.com/splash?form_file=fdf/splash.fdf&dn=www.jumbo.pt&lang=pt";var windowHandler = window.open(href, "verisignss", "width=535,height=450,top=100,left=100");windowHandler.focus();}
function ChangeToSSL() { document.forms[0].action = "https://" + CurrentAbsoluteUrl; }

function ProcessWatermarkEffect(textboxObj, textToCompare, onInput){if(onInput == true){if(textboxObj.value == textToCompare){textboxObj.value = ''; }}else{if(textboxObj.value == ''){textboxObj.value = textToCompare; }}}
function SPgr(){}
function imgOnOff(self){if(self.src.indexOf("_on") > 0 ) self.src = self.src.replace("_on","_off"); else self.src = self.src.replace("_off","_on");}
function OpenWindow(sStr){window.open(sStr);}
function MarkupCounter(checkbox, counterControl){if (checkbox.checked) counterControl.value++; else counterControl.value--;}
function MarkUnmarkAll(idsList, status){var list = idsList.value.split(";"); for(var index = 0; index < list.length; index++) { var item = document.getElementById(list[index]); if(item != null) if(item.disabled == false) item.checked = status; }}
function ShowProgress(hidePanel,showPanel){ var hideP = document.getElementById(hidePanel); var showP = document.getElementById(showPanel); if(hideP != null) { hideP.style.display = 'none'; } if(showP != null) { showP.style.display = ''; setTimeout("document.getElementById('ProgressImg').src = document.getElementById('ProgressImg').src;",50); }}
function SSPgr(){ ChangeDisplay('SPanel'); var html = "<table width=\"365\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td height=\"30\" colspan=\"3\"><img src=\"../Images/caixaLateral_header07.gif\" width=\"365\" height=\"30\"></td></tr><tr><td><table width=\"365\" height=\"400\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"20\" background=\"../Images/body_esq.gif\">&nbsp;</td><td valign=\"top\" style=\"padding-top: 200px; padding-bottom: 200px;\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"leadInicial\" style=\"text-align: center; vertical-align: middle; width: 100%;\"><span class=\"headerConta\">A actualizar</span></td></tr><tr><td class=\"leadInicial\" style=\"text-align: center; vertical-align: middle; width: 100%;padding-left: 20px;\"><img id=\"ProgressImg\" src=\"../Images/SpinnerBig.gif\" /></td></tr></table></td><td width=\"20\" background=\"../Images/body_dir.gif\">&nbsp;</td></tr></table></td></tr><tr><td height=\"20\"><!--<script language=\"javascript\">displayTransparentPNG('../Images/caixaLateralInt_inferior.png',365,20)</script>--><img src=\"../images/caixaLateralInt_inferior.gif\" /></td></tr></table>"; var placeholder = document.getElementById('SPgr'); if(placeholder!= null) placeholder.innerHTML = html;}
function ChangeDisplay(elementId){ var container = document.getElementById(elementId); if(container != null) { var nextState = container.style.display == 'none' ? 'block' : 'none'; container.style.display = nextState; }}
function ConfirmMessageBox(text){ if (confirm(text)==true) return true; else return false;}
function blurUpdateQuantities(originalValueObjectId, newValueObjectId, regExpression){var originalValueObject = document.getElementById( originalValueObjectId);var newValueObject = document.getElementById( newValueObjectId); var newValue = new String( newValueObject.value);var originalValue = new String( originalValueObject.value);var regExp = new RegExp(regExpression);newValue = newValue.replace( ',', '.');originalValue = originalValue.replace( ',', '.');if (!regExp.test( newValue)){if (regExpression.indexOf( '[,]', 0) == -1)alert( 'Erro no formato da quantidade. Formato correcto: ddd ou ddd,dd'); else alert('Erro no formato da quantidade. Formato correcto: ddd,dd'); newValueObject.value = originalValueObject.value; return false; } if (newValue == originalValue) return false; else return true;}
function DisKey(){if(window.event.keyCode==13){return false;}}