function enlarge()
{
	var fader = document.getElementById('fader');

	var popup = document.getElementById('popup');
	
	fader.style.width = document.documentElement.scrollWidth+'px';
	fader.style.height = document.documentElement.scrollHeight+'px';

	fader.style.display = 'block';

	popup.style.display = 'block';
	popup.style.top = 74 + 'px';
	popup.style.left = 880 + 'px';
}

function hide()
{
	var popup = document.getElementById('popup');
	
	popup.style.display = 'none';
	
	var fader = document.getElementById('fader');	
	fader.style.display = 'none';		
}

function enlarge2()
{
	var fader = document.getElementById('fader');

	var popup2 = document.getElementById('popup2');
	
	fader.style.width = document.documentElement.scrollWidth+'px';
	fader.style.height = document.documentElement.scrollHeight+'px';

	fader.style.display = 'block';

	popup2.style.display = 'block';
	//popup2.style.top = 180 + 'px';
	//popup2.style.left = 430 + 'px';
}

function hide2()
{
	var popup2 = document.getElementById('popup2');
	
	popup2.style.display = 'none';
	
	var fader = document.getElementById('fader');	
	fader.style.display = 'none';		
}


/* Popup Window */

function popitup(url) {
	newwindow=window.open(url,'_blank','height=530,width=490,scrollbars=yes,resizable=no');
	if (window.focus) {newwindow.focus()}
	return false;
}
/* Popup Window */



function toggle_visibility(id) {
	var e = document.getElementById(id);
	if(e.style.display == 'block')
	  e.style.display = 'none';
	else
	  e.style.display = 'block';
}

function showHideModalLayer(id){
    var obj = document.getElementById(id);
    //checkScroll(obj);
    if (obj.style.visibility == 'hidden'){
        setMaskVisibility('visible',id); // display the mask layer
        obj.style.visibility = 'visible'; // display the later we want in the forground
        
        // get the document and window dimensions so we can center the div
        xWidth = getPageWidth();  // get the page width
        divWidth = makeInt(obj.style.width); // get the width of the div that we are showing - call makeInt will makesure we strip any text from it such as 'px'
        yHeight = getWindowHeight(); // get the window height, because we want to display this in the center of the view, no matter what the scroll position is.
        divHeight = makeInt(obj.style.height); // get the height of the div, we will use this to center it vertically in the window
        offset = (yHeight-divHeight)/2; // calculate the offset from the top of the page so that we can position it correctly
        obj.style.left = ((xWidth-divWidth)/2) + "px"; // set the left margin so that the div is centered on the screen, need to append px for FF.
        obj.style.zindex = '1000';
        
        checkScroll(obj,offset); // set the top of the div taking into account any scrolling
        
        //hide any controls that will not fall behind the mask -- IE 6 only
        hideControls('hidden');
    } else {
        obj.style.visibility = 'hidden'; // hide the div
        obj.style.zindex = '-1000';
        setMaskVisibility('hidden',id); // hide the mask
        // display any controls that were hidden to keep up clean -- IE Only
        hideControls('visible');
    }
}

function switch1(div)
{
if (document.getElementById('one'))
{
var option=['one','two','three','four','five','six','seven','eight','nine','ten','eleven'];
for(var i=0; i<option.length; i++)
{ obj=document.getElementById(option[i]);
obj.style.display=(option[i]==div)? "block" : "none"; }
}
}
//
function switch2() 
{
var option=['tel1','tel2'];
for(var i=0; i<option.length; i++)
{ obj=document.getElementById(option[i]);
obj.className=(obj.className=="visible")? "hidden" : "visible"; }
}
function toggle(div) 
{
var option=['wine1','beer1','whisky1'];

for(var i=0; i<option.length; i++)
{ obj=document.getElementById(option[i]);
obj.style.display=(option[i]==div) && !(obj.style.display=="block")? "block" : "none"; }
}

window.onload=function(){switch1('one');}

