﻿
// Funcion para onmaouse over de las imagenes
function Rollover(theImage, theSrc) {
    var objStr, obj;
    if (document.images) {
        if (typeof (theImage) == 'string') {
            objStr = 'document.' + theImage;
            obj = eval(objStr);
            obj.src = theSrc;
        }
        else if ((typeof (theImage) == 'object') && theImage && theImage.src) {
            theImage.src = theSrc;
        }
    }
}

function SetMenuDefault(idSection) {
    switch (idSection) {
        case "1":
            document.QA.src = "/Images/buttons/menu_agenda_on.gif";
            break;
        case "2":
            document.QM.src = "/Images/buttons/menu_music_on.gif";
            break;
        case "3":
            document.QAC.src = "/Images/buttons/menu_artcult_on.gif";
            break;
        case "4":
            document.QBG.src = "/Images/buttons/menu_blog_on.gif";
            break;            
        default:
            break;
    }
}

function LoadMap(longitude, latitude, containerId) {
        document.getElementById(containerId).src = "/mapa.aspx?long=" + longitude + "&lat=" + latitude;
    }

// open a popup window
function openwin(url, w, h, s) {
    var scrl;
    if (s) { scrl = "scrollbars=yes,"; w = w + 16; }
    else { scrl = "scrollbars=no,"; }

    if (!w) w = 640;
    if (!h) h = 480;

    fenster = window.open(url, "_blank", scrl + "resizable=yes,width=" + w + ",height=" + h + ",screenX=50,screenY=50");
    fenster.focus();
   }

   //** Show category
   var temp_cat = "category_1";
   function ShowReviewByCat(cat) {

   	$("#" + temp_cat).fadeOut("fast",
   	    function() {
   	$("#" + cat).fadeIn("fast");
   	    }
   	);

   	    $("#item_" + temp_cat).parent().attr("style", "background:none");
   	    $("#item_" + cat).parent().attr("style", "background:white");
   	temp_cat = cat  	

   }
   
function ClearField(fieldId, default_value)
{

    if(document.getElementById(fieldId)!=null && document.getElementById(fieldId).value==default_value)
    {            
            document.getElementById(fieldId).value = '';
    }
}



