function ShowHideElementByID(id,id2){if(document.getElementById(id).style.display=="none")
{document.getElementById(id).style.display='block';document[id2].src='http://www.fishesup.com/images/plus.gif';}
else
{document.getElementById(id).style.display='none';document[id2].src='http://www.fishesup.com/images/minus.gif';}}
function ShowHideElementByIDText(id,ex){if(document.getElementById(id).style.display=="none")
{document.getElementById(id).style.display='block';}
else
{document.getElementById(id).style.display='none';}
if(document.getElementById(ex).innerHTML=="More...")
{document.getElementById(ex).innerHTML='Hide...';}else
{document.getElementById(ex).innerHTML='More...';}}
function bookmark(){var pgUrl=window.location.href;var pgTitle=document.title;if(window.sidebar){window.sidebar.addPanel(pgTitle,pgUrl,"");}else if(document.all){window.external.AddFavorite(pgUrl,pgTitle);}else if(window.opera&&window.print){var elem=document.createElement('a');elem.setAttribute('href',pgUrl);elem.setAttribute('title',pgTitle);elem.setAttribute('rel','sidebar');elem.click();}}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
function findItem(n,d){var p,x,i;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)
x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=findItem(n,d.layers[i].document);return x;}
function toggleCategorias(id){obj=MM_findObj(id);if(typeof(obj.style)!='undefined'){if(obj.style.display!='none'){obj.style.display='none';WriteCookie(id.toString(),'off')}else{obj.style.display='block';WriteCookie(id.toString(),'on')}}}
function toggleAdicionales(id){obj=MM_findObj(id);if(typeof(obj.style)!='undefined'){if(obj.style.display!='none'){obj.style.display='none';}else{obj.style.display='block';}}}
function popup(url,ancho,alto,id,extras){if(navigator.userAgent.indexOf("Mac")>0){ancho=ancho+0;alto=alto+0;}
var left=(screen.availWidth-ancho)/2;var top=(screen.availHeight-alto)/2;if(extras!=""){extras=","+extras;};var ventana=window.open(url,id,'width='+ancho+',height='+alto+',left='+left+',top='+top+',screenX='+left+',screenY='+top+extras);if(ventana==null||typeof(ventana.document)=="undefined")alert("Warning:\n\n Please desactive the popup block in your browser.");}
function trim(str){return str.replace(/^\s*|\s*$/g,"");}
errColor='#8CB2D8'
function completo(obj,nombre,tipo){if(tipo=='int'){if((trim(obj.value)=='')||(isNaN(obj.value))){obj.style.backgroundColor=errColor;return"\n* "+nombre+" "}else{return"";};}else{if(trim(obj.value)==''){obj.style.backgroundColor=errColor;return"\n* "+nombre+"."}else{return""}}}
function emailvalido(obj,nombre){msg="";if(obj.value!=""){var reg1=/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;var reg2=/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;if(reg1.test(obj.value)||!reg2.test(obj.value)){obj.style.backgroundColor=errColor;msg="\n* "+nombre+"."}}else{obj.style.backgroundColor=errColor;msg="\n* "+nombre+" "}return msg}
function telefonovalido(obj,nombre){var reg=/\d{3,}(.?\d{3,})+/;if((obj.value!="")&&!reg.test(obj.value)){obj.style.backgroundColor=errColor;return"\n* "+nombre+" ";}else{return"";}}
function chequeado(obj,nombre){ok=false;for(i=0;i<obj.length;i++){obj[i].style.backgroundColor='';if(obj[i].checked){ok=true;};};if(ok){return""}else{for(i=0;i<obj.length;i++)obj[i].style.backgroundColor=errColor;return"\n* "+nombre+" "}}
function getCheckedValue(radioObj){if(!radioObj)
return"undefined::1";var radioLength=radioObj.length;if(radioLength==undefined)
if(radioObj.checked)
return radioObj.value;else
return"undefined::2";for(var i=0;i<radioLength;i++){if(radioObj[i].checked){return radioObj[i].value;}}
return"undefined::3";}
function setCheckedValue(radioObj,newValue){if(!radioObj)
return;var radioLength=radioObj.length;if(radioLength==undefined){radioObj.checked=(radioObj.value==newValue.toString());return;}
for(var i=0;i<radioLength;i++){radioObj[i].checked=false;if(radioObj[i].value==newValue.toString()){radioObj[i].checked=true;}}}
function ReadCookie(name){var namearg=name+"=";var nlen=namearg.length;var clen=document.cookie.length;var i=0;while(i<clen){var j=i+nlen;if(document.cookie.substring(i,j)==namearg){var endpos=document.cookie.indexOf(";",j);if(endpos==-1)endpos=document.cookie.length;return unescape(document.cookie.substring(j,endpos));}
i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}
return null;}
function WriteCookie(name,value){var expdate=new Date();expdate.setTime(expdate.getTime()+10*365*24*60*60*1000);document.cookie=name+"="+escape(value)+"; expires="+expdate.toGMTString();}
function toggle_nav(id){obj=MM_findObj(id);if(typeof(obj.style)!='undefined'){if(obj.style.display!='none'){obj.style.display='none';WriteCookie(id.toString(),'off')}else{obj.style.display='block';WriteCookie(id.toString(),'on')}}}
function sacarLink(){var obj=document.formulario.sitio.value;if(obj!=''){var tt=obj.indexOf('http://',0);if(tt==-1){obj='http://'+obj;}
window.open(obj);}}
function marcame(){var d=document.formularioProductos;var fld='codigoCheck[]';var action=d['chequearTodos'].checked==true?1:0;for(var i=0;i<d.length;i++){var obj=d.elements[i]
var name=obj.name
if(name==fld){obj.checked=((action==1)?true:((action==0)?false:!obj.checked));}}}
function ponerMascara(){document.getElementById("mascara").style.display="block";document.getElementById("ventanita").style.display="block";}
function bookmarksite(title,url){if(document.all)
window.external.AddFavorite(url,title);else if(window.sidebar)
window.sidebar.addPanel(title,url,"")}
function validar(){document.formulario.submit();}
if(!document.all)document.captureEvents(Event.KEYPRESS);document.onkeypress=trackKeyPress;function trackKeyPress(e){if(!document.all){if(e.which==13)document.formulario.submit();}else{if(event.keyCode==13)document.formulario.submit();}}
if(document.getElementById||document.all){document.write('<div id="trailimageid">');document.write('</div>');}
function gettrailobj(){if(document.getElementById)
return document.getElementById("trailimageid").style
else if(document.all)
return document.all.trailimagid.style}
function gettrailobjnostyle(){if(document.getElementById)
return document.getElementById("trailimageid")
else if(document.all)
return document.all.trailimagid}
var offsetfrommouse=[0,0];var displayduration=0;var currentimageheight=270;function showbox(media,title,description,showthumb,height,type,wi,he,source){document.onmousemove=followmouse;<!--TYPE:1-IMAGE/2-VIDEO SOURCE:1-DOGUP/2-FLICKR->gettrailobj().width=wi+10+"px";gettrailobj().height=he+10+"px";<!--gettrailobj().top="100px"->if(type==2){newHTML='<div id=videobox style="background-image: url(http://www.dogup.com/images/loading.gif) !important;">';}else
{newHTML='<div id=videobox>';}
newHTML=newHTML+'<a href="#" onclick="closebox();">Close</a>';newHTML=newHTML+'<h2>'+title+'</h2>';newHTML=newHTML+description+'<br/>';newHTML=newHTML+'<div align="center" style="padding: 2px 2px 2px 2px;">';if(type==2){newHTML=newHTML+'<object width="'+wi+'" height="'+he+'">';newHTML=newHTML+'<param name="movie" value='+media+'></param>';newHTML=newHTML+'<param name="wmode" value="transparent"></param>';newHTML=newHTML+'<embed src="'+media+'" type="application/x-shockwave-flash" wmode="transparent" width="'+wi+'" height="'+he+'"></embed>';newHTML=newHTML+'</object></div>';}else{if(source==1)
{newHTML=newHTML+'<img src="http://www.dogup.com/uploaded/album/'+media+'" width="'+wi+'" height="'+he+'">';}else
{newHTML=newHTML+'<img src="'+media+'" width="'+wi+'" height="'+he+'">';}}
newHTML=newHTML+'</div>';gettrailobjnostyle().innerHTML=newHTML;gettrailobj().display="inline";}
function closebox(){gettrailobj().innerHTML=" ";gettrailobj().display="none"
document.onclick=""}
function followmouse(e){var xcoord=offsetfrommouse[0]
var ycoord=offsetfrommouse[1]
var docwidth=document.all?truebody().scrollLeft+truebody().clientWidth:pageXOffset+window.innerWidth-15
var docheight=document.all?Math.min(truebody().scrollHeight,truebody().clientHeight):Math.min(window.innerHeight)
if(typeof e!="undefined"){if(docwidth-e.pageX<380){xcoord=e.pageX-xcoord-400;}else{xcoord+=e.pageX;}
if(docheight-e.pageY<(currentimageheight+110)){ycoord+=e.pageY-Math.max(0,(110+currentimageheight+e.pageY-docheight-truebody().scrollTop));}else{ycoord+=e.pageY;}}else if(typeof window.event!="undefined"){if(docwidth-event.clientX<380){xcoord=event.clientX+truebody().scrollLeft-xcoord-400;}else{xcoord+=truebody().scrollLeft+event.clientX}
if(docheight-event.clientY<(currentimageheight+110)){ycoord+=event.clientY+truebody().scrollTop-Math.max(0,(110+currentimageheight+event.clientY-docheight));}else{ycoord+=truebody().scrollTop+event.clientY;}}
if(ycoord<0){ycoord=ycoord*-1;}
gettrailobj().left=xcoord+"px"
gettrailobj().top=ycoord+"px"}
function makelink(var_id,elem_id,searched){var nodeDropdown=document.getElementById(elem_id);if(nodeDropdown&&nodeDropdown[nodeDropdown.selectedIndex].value!='0')return true;if(document.getElementById(var_id)!=null){var sKeyword=document.getElementById(var_id).value;if(/[^\w\-\s]/.test(sKeyword)||sKeyword.search(/\S/)==-1||!searched)return true;sKeyword=sKeyword.replace(/-/g,'_-_');sKeyword=sKeyword.replace(/\s+/g,' ');sKeyword=sKeyword.replace(/\s/g,'-');var func=typeof(encodeURIComponent)!="undefined"?encodeURIComponent:escape;searched=searched.replace(/SEARCHTERM/g,func(sKeyword));location.href=searched;document.getElementById("forme").action=searched;document.getElementById("forme").submit();return false;}
return true;}
