// Adjust footer according to the container height
function AdjustColumnsHeight()
{
var container = window.document.getElementById('main');
var hContainer = container.offsetHeight;
var maxHeight = hContainer;
if(window.document.getElementById('contentLeft') != null)
{
var hContLeft = window.document.getElementById('contentLeft').offsetHeight;
var hContRight = window.document.getElementById('contentRight').offsetHeight;
var maxContentHeight = Math.max(hContLeft, hContRight);
window.document.getElementById('footer').style.marginTop = 0 + 'px';
window.document.getElementById('footer').style.top = maxHeight + 'px';
//window.document.getElementById('contentLeft').style.height = maxContentHeight + 'px';
//window.document.getElementById('contentRight').style.height = maxContentHeight + 'px';
window.document.getElementById('content').style.height = maxContentHeight + 'px';
}
if(window.document.getElementById('cCRt') == null)
{
window.document.getElementById('container').style.background = 'url(App_themes/General/Layout/contentBg.png)';
}
}
// if this is the only one script file, uncomment the following line!
//window.onload = function(){ AdjustColumnsHeight();}
function HideShowShoppingCart()
{
if(window.document.getElementById('ctl00_btnShoppingCart') != null)
{window.document.getElementById('ctl00_pnlEShop').style.display = 'block';}
else
{window.document.getElementById('ctl00_pnlEShop').style.display = 'none';}
}
// show/hide the share article div
function showTagger(obj)
{
var el = window.document.getElementById(obj);
if(el != "")
{
if (el.style.display == "none")
{
el.style.display = "block";
} else {
el.style.display = "none";
}
} AdjustColumnsHeight();
}
// show/hide modal popus for logging
function ShowLoginPopup()
{
$find(
"openLogin").show();
HideRegisterPopup();
HidePasswordRecoveryPopup();
}
function HideLoginPopup()
{
$find(
"openLogin").hide();
}
function ShowRegisterPopup()
{
$find(
"openRegister").show();
HideLoginPopup();
HidePasswordRecoveryPopup();
}
function HideRegisterPopup()
{
$find(
"openRegister").hide();
}
function ShowPasswordRecoveryPopup()
{
$find(
"openPasswordRecovery").show();
HideLoginPopup();
HideRegisterPopup();
}
function HidePasswordRecoveryPopup()
{
$find(
"openPasswordRecovery").hide();
}
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("pageI" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=400,left = 200,top = 200');");
}
function GetImage(ImageUrl, ret){
if (ret == false)
{
window.document.getElementById('popImage').innerHTML = '<img src="'+ ImageUrl +'" alt="'+ ImageUrl + '" /><br/><br/>';
} else {
window.document.getElementById('popImage').innerHTML = "<img src=\"Images/p_"+ ImageUrl +"\" alt=\""+ ImageUrl + "\" width=\"300px\" height=\"300px\" /><a class=\"lnk\" href=\"javascript:popUp('/ShowImage.aspx?Img="+ ImageUrl +"');\"><br/>Clicca per aprire immagine nella dimensione originale</a><br/>";
}
ShowImageUrlPopup();
}
function ShowImageUrlPopup()
{
$find(
"openImageUrl").show();
}
function HideImageUrlPopup()
{
$find(
"openImageUrl").hide();
}
var state = 'hidden';
function showhide(layer_ref) {
if (state == 'visible') {
state = 'hidden';
}
else {
state = 'visible';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.visibility = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].visibility = state;
}
if (document.getElementById && !document.all) {
maxwell_smart = document.getElementById(layer_ref);
maxwell_smart.style.visibility = state;
}
}
