//
// updated 22.05.2011
//

// create mask on load for popups
var fMask = new frmMask();

window.onload = function()
	{
	fMask.buildMask();
	}

var close_window=function()
	{
	// call back function to close popup window
	fMask.maskOff();
	}

function fnShowMenu()
	{
	// show/hide main menu
	if (mainmenu.style.display=='')
		{
		mainmenu.style.display='none';
		address.style.display='none';
		}
		else
		{
		mainmenu.style.display='';
		address.style.display='';
		}
	}
function fnSelect(page_ref)
	{
	if (page_ref=='')
		{
		window.alert('This page is under construction, please check soon...');
		return;
		}
	if (page_ref=='cv')
		{
		// open cv for download
		window.open('styles/smw_cv.pdf');
		return;
		}
	if (page_ref=='home')
		{
		window.location='index.html';
		return;
		}
	// open selected page
	if (page_ref=='email')
		{
		window.open('mailto:enquiries@sophiemyfanwywellan.co.uk');
		}
		else
		{
		window.location=page_ref + '.htm';
		}
	}
function fnZoom(image_name)
	{
	// set path
	var img_path = 'images/zoom/' + image_name + '.jpg';
	//alert(img_path);
	// show zoom of image
	fMask.popupImage(img_path);
	fMask.maskOn();

	}
function PopupPic(sPicURL) 
   	{ 
     window.open( "zoompic.html?"+sPicURL, "","resizable=1,HEIGHT=200,WIDTH=200"); 
   	} 

