function swapImg(inImage, t){
	if (t == 1){
		if (inImage.src.indexOf('_on.gif') == -1) {
			inImage.src = inImage.src.slice(0,inImage.src.length-4) + '_on.gif';
		}
	}
	else {
		inImage.src = inImage.src.slice(0,inImage.src.length-7) + '.gif';
	}
}

function openWin(url, height, width) {
	var height = height;
	var width = width;
	var scroll = 0;
	var wleft = (screen.width - width-20) / 2;
	var wtop = (screen.height - height) / 2;
	window.open(url,'thewin','fullscreen=0,scrollbars='+scroll+',height='+height+',width='+width+',top='+wtop+',left='+wleft+'');
}
function openWin2(url, height, width) {
	var height = height;
	var width = width;
	var scroll = 1;
	var wleft = (screen.width - width-20) / 2;
	var wtop = (screen.height - height) / 2;
	window.open(url,'thewin','fullscreen=0,scrollbars='+scroll+',height='+height+',width='+width+',top='+wtop+',left='+wleft+'');
}
function openProdWin(url) {
	var width = 800
	var height = 600;
	var wleft = (screen.width - width-20) / 2;
	var wtop = (screen.height - height) / 2;
	window.open(url,'prodWin','status=no,toolbar=no,menubar=no,location=no,height='+height+',width='+width+',top='+wtop+',left='+wleft);
}
function showNewsletterSignup() {
    var actNews = document.getElementById('actNews');
    actNews.style.top = document.body.scrollTop;

    if (actNews.style.display == 'none' || actNews.style.display == '') {
        actNews.style.display = 'block';
        document.body.style.overflow = 'hidden';
    } else {
        actNews.style.display = 'none';
        document.body.style.overflow = 'auto';
    }
}
function showExceptions(prod_id) {
    var Exception = document.getElementById('Excep' + prod_id);
    //actNews.style.top = document.body.scrollTop;

    if (Exception.style.display == 'none' || Exception.style.display == '') {
        Exception.style.display = 'block';
        document.body.style.overflow = 'hidden';

        var ScrollTop = document.body.scrollTop;
        if (ScrollTop == 0) {
            if (window.pageYOffset) {
                ScrollTop = window.pageYOffset;
            } else {
                ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
            }
        }
        //alert(eval(ScrollTop + 'px'));

        $(Exception).css("top",ScrollTop + 'px');
        Exception.style.left = '0px';
        Exception.style.width = document.body.offsetWidth;
        Exception.style.height = document.body.offsetHeight;
    } else {
        Exception.style.display = 'none';
        document.body.style.overflow = 'auto';
    }
}
