function changeMainImage(strLibraryID, strImageID, strExtension, strCaption)
{
document.images['LargeImage'].src = "library_media/" + strLibraryID + "/photos/" + strImageID + "." + strExtension;
document.images['LargeImage'].alt = strCaption;
document.images['LargeImage'].title = strCaption;
document.getElementById("linkLargeImage").href = "library_media/" + strLibraryID + "/photos/" + strImageID + "_big." + strExtension; ;
alert(document.getElementById("").innerHTML);
}

function changeMainImage(strLibraryID, strImageID, strExtension, strCaption, intLinkID) {
    document.images['LargeImage'].src = "library_media/" + strLibraryID + "/photos/" + strImageID + "." + strExtension;
    document.images['LargeImage'].alt = strCaption;
    document.images['LargeImage'].title = strCaption;
    document.getElementById("linkLargeImage").href = "library_media/" + strLibraryID + "/photos/" + strImageID + "_big." + strExtension; ;
    myLightbox.updateDetails(strCaption);

    resetHiddenLinkList(intLinkID);
}

function resetHiddenLinkList(intLinkID) 
{
    var arrHiddenLinks = document.getElementById("hiddenLinks").getElementsByTagName("a");
    for (var i = 0; i < arrHiddenLinks.length; i++) {
        if (i != intLinkID)
            document.getElementById("linkSmallImage" + i).setAttribute("rel", "lightbox[library]");
        else
            document.getElementById("linkSmallImage" + i).setAttribute("rel", "");
    }
}

function changeHREF(strPath,strCaption)
{
document.forms[0].hideHREF.value = strPath;
document.forms[0].hideCaption.value = strCaption;
}


function load(strYCoord, strXCoord)
{
if (GBrowserIsCompatible())
	{
	var map = new GMap2(document.getElementById("map"));
	map.setCenter(new GLatLng(strYCoord,strXCoord), 13);
	}
}


function popUpMedia(intMediaType,strLibraryID,strImageID,strExt,strCaption)
{
var strURL = (intMediaType == 2) ? "Virtual_Tour.aspx" : "Video.aspx";
strURL += "?ID=" + strLibraryID;
strURL += "&ImageID=" + strImageID;
strURL += "&Ext=" + strExt;
strURL += "&Caption=" + strCaption;

window.open(strURL,'LibraryPop','menubar=0,toolbar=0,scrollbars=0,location=0,height=500,width=420');
}


function popUpGoogle(intCoordsY, intCoordsX, strCaption)
{
var intWidth = 600;
var intHeight = 600;
var intLeft = (screen.width) ? (screen.width - intWidth) / 2 : 0;
var intTop = (screen.height) ? (screen.height - intHeight) / 2 : 0;

var strSettings = "height=" + intHeight;
strSettings += ",left=" + intLeft;
strSettings += ",top=" + intTop;
strSettings += ",width=" + intWidth;
strSettings += "location=no";

window.open('googleMap.aspx?X=' + intCoordsY + '&Y=' + intCoordsX + '&Caption=' + strCaption, 'GoogleMap', strSettings);
}
