//------------------------------------------------------------- //-- NAV BAR //------------------------------------------------------------- var last_navbar_button = null; var default_bg_color = "#D2D791"; var over_bg_color = "#B2C98C"; var down_bg_color = "#B0C00C"; var button_color = ""; var default_class = "table_row"; var over_class = "table_row_over"; var down_class = "table_row_selc"; var button_class = ""; function set_last( td ){ if ( last_navbar_button ){ last_navbar_button.bgColor = button_color; } last_navbar_button = td; if ( td ) button_color = td.bgColor; } function navbar_over( td ){ set_last( td ); last_navbar_button.bgColor = over_bg_color; } function navbar_out( td ){ set_last( null ); } function navbar_down( td ){ set_last( td ); last_navbar_button.bgColor = down_bg_color; } function navbar_up( td ){ set_last( td ); last_navbar_button.bgColor = over_bg_color; } function navbar_click( url ){ alert( url ); } /* function set_last( td ){ if ( last_navbar_button ){ last_navbar_button.className = button_class; } last_navbar_button = td; if ( td ) button_class = td.className; } function navbar_over( td ){ set_last( td ); last_navbar_button.className = over_class; } function navbar_out( td ){ set_last( null ); } function navbar_down( td ){ set_last( td ); last_navbar_button.className = down_class; } function navbar_up( td ){ set_last( td ); last_navbar_button.className = over_class; } function navbar_click( url ){ alert( url ); } */ //------------------------------------------------------------- //-- END NAV BAR //------------------------------------------------------------- function DoNavigateCategory( id, parent ) { document.portalForm.currentCategoryParent.value=parent; document.portalForm.currentCategory.value=id; portalDoNavigate( 'products', 'categsbase' ); } function DoNavigateSubCategory( id, parent ) { document.portalForm.currentCategoryParent.value=parent; document.portalForm.currentCategory.value=id; portalDoNavigate( 'products', 'subcategs' ); } function DoNavigateSubCategory2( id, parent ) { document.portalForm.currentCategoryParent.value=parent; document.portalForm.currentCategory.value=id; portalDoNavigate( 'products', 'subcategs' ); } function DoNavigateProducto( id, categ, parent ) { document.portalForm.currentCategoryParent.value=parent; document.portalForm.currentCategory.value=categ; document.portalForm.currentProduct.value=id; portalDoNavigate( 'products', 'producto' ); } function DoNavigateProducto2( id, categs, parent ) { document.portalForm.categs.value=categs; document.portalForm.currentProduct.value=id; portalDoNavigate( 'products', 'producto' ); } function preloadImages() { if(!document.imagesPreloaded) document.imagesPreloaded=new Array(); document.imagesPreloaded[0] = new Image; document.imagesPreloaded[0].src = 'http://www.ehsantelmo.com.ar/images/vineta_navmenu_over.gif'; document.imagesPreloaded[1] = new Image; document.imagesPreloaded[1].src = 'http://www.ehsantelmo.com.ar/images/vineta_navmenu.gif'; document.imagesPreloaded[2] = new Image; } function overMainLink(link) { var img = 'http://www.ehsantelmo.com.ar/images/menu_red.gif'; if ( document.all ) { lastImageMenu = document.all['menuLink_'+link].style.background; document.all['menuLink_'+link].style.background = "url("+img+")"; } else { lastImageMenu = document.getElementById('menuLink_'+link).style.background ; document.getElementById('menuLink_'+link).style.background = "url("+img+")" ; } } function outMainLink(link, color) { var imagen; if (color==0) imagen = 'url(/images/menu_ora.gif)'; if (color==1) imagen = 'url(/images/menu_red.gif)'; if (color==2) imagen = 'url(/images/menu_bro.gif)'; if ( document.all ) document.all['menuLink_'+link].style.background = imagen; else document.getElementById('menuLink_'+link).style.background = imagen; } function overNavLink(link) { document.images[link].oSrc = document.images[link].src; document.images[link].src = 'http://www.ehsantelmo.com.ar/images/vineta_navmenu_electrahouse_over.gif'; } function outNavLink(link) { document.images[link].src = document.images[link].oSrc; } function changePic(pic,newpic,divtag) { if (document.images) { if (document.layers && divtag!=null) { eval('document.'+divtag+'.document.images["'+pic+'"].src = '+newpic); } else { document [pic].src = newpic; } } } function sacaLogin(){ for (var i = 0; i < document.portalForm.elements.length; i++) { if ( document.portalForm.elements[i].name == "portalActions[]" ){ if ( document.portalForm.elements[i].value == "actionLogin" ){ document.portalForm.elements[i].value = ""; } } } } function doLogin(){ for (var i = 0; i < document.portalForm.elements.length; i++) { if ( document.portalForm.elements[i].name == "portalActions[]" ) if ( document.portalForm.elements[i].value == "" ){ document.portalForm.elements[i].value = "actionLogin"; } } document.portalForm.submit(); } function doLogout(){ for (var i = 0; i < document.portalForm.elements.length; i++) { if ( document.portalForm.elements[i].name == "portalActions[]" ) if ( document.portalForm.elements[i].value == "" ){ document.portalForm.elements[i].value = "actionLogoff"; } } document.portalForm.submit(); } function gotoHome(){ sacaLogin(); portalDoNavigate( '','' ); } function selectNewsCategory( categ, all ){ document.portalForm.Categ_id.value=categ; if ( all ) document.portalForm.view_all.value=true; portalDoNavigate( 'news', 'category' ); } function selectNote( note_id, all ){ document.portalForm.Note_id.value=note_id; if ( all ) document.portalForm.view_all.value=true; portalDoNavigate( 'news', 'default' ); } function selectLocal( idLocal ){ document.portalForm.idLocal.value = idLocal; portalDoNavigate( 'electrahouse_locales', 'default' ); } //--------------------------------------- //--------------------------------------- function layerShowHide( id, id2 ){ if ( id.className=="oculto" ){ id.className=""; id2.className="oculto"; }else{ id.className="oculto"; id2.className=""; } } //------------------------------------- //------------------------------------ function showAvanzada(){ div = document.getElementById( 'b_avanzado' ); if( div.style.display == "" ) div.style.display = "none"; else div.style.display = ""; }