function open_photos(name,whichshowcase)

{

	   

        var width=screen.availWidth;  

        var height=screen.availHeight;  

        var newWin="scrollbars=yes,width=400,height=600,status=no,top=" + (height-500)/2 + ",left=" + (width-800)/2;  

        //window.resizeTo(width,height);  

        var photoswindow = window.open(name,"NewWin",newWin);  



        //photoswindow.creator = self;

        if(photoswindow.open)      

        {

                photoswindow.focus();

        }  

}

function open_videos(name,whichshowcase)

{

	   

        var width=screen.availWidth;  

        var height=screen.availHeight;  

        var newWin="scrollbars=yes,width=800,height=600,status=no,top=" + (height-800)/2 + ",left=" + (width-1200)/2;  

        //window.resizeTo(width,height);  

        var videoswindow = window.open(name,"NewWin",newWin);  



        //videoswindow.creator = self;

        if(videoswindow.open)      

        {

                videoswindow.focus();

        }  

}

function open_date(name,whichshowcase)

{

	   

        var width=screen.availWidth;  

        var height=screen.availHeight;  

        var newWin="scrollbars=yes,width=300,height=200,status=no,top=" + (height-200)/2 + ",left=" + (width-200)/2;  

        //window.resizeTo(width,height);  

        var videoswindow = window.open(name,"NewWin",newWin);  



        //videoswindow.creator = self;

        if(videoswindow.open)      

        {

                videoswindow.focus();

        }  

}


/*function to validate the form on the Contact page*/

function validateContactForm() 

{	

	var returnStr = "";

	if (document.contactForm.full_name.value == "" || document.contactForm.full_name.value == null)

		returnStr = returnStr + "\r\nFull Name";

	if (document.contactForm.email_address.value == "" || document.contactForm.email_address.value == null)

		returnStr = returnStr + "\r\nEmail Address";

	if (document.contactForm.address_line_1.value == "" || document.contactForm.address_line_1.value == null)

		returnStr = returnStr + "\r\nAddress Line 1";

	if (document.contactForm.city.value == "" || document.contactForm.city.value == null)

		returnStr = returnStr + "\r\nCity";

	if (document.contactForm.state.options[contactForm.state.selectedIndex].value == "" || document.contactForm.state.options[contactForm.state.selectedIndex].value == null)

		returnStr = returnStr + "\r\nState";

	if (document.contactForm.zip.value == "" || document.contactForm.zip.value == null)

		returnStr = returnStr + "\r\nZip";

	if (document.contactForm.comment.value == "" || document.contactForm.comment.value == null)

		returnStr = returnStr + "\r\nComment";

	

	if (returnStr.length > 0)

	{

		alert("The following fields are required and must be completed before you can submit this form:\r\n\r\n" + returnStr + "\r\n\r\nPlease complete these fields and try again.");

		return false;		

	}

	else

		return true;

}



/*function to read a value out of a query string*/

function getQueryStringValue(queryStr, lookup) 

{

	var queryParams = new Array();

	var params = queryStr.split("&");

	for (var i=0; i<params.length; i++) 

	{

		var pos = params[i].indexOf('=');

		if (pos > 0) 

		{

			var key = params[i].substring(0,pos);

			var val = params[i].substring(pos+1);

			queryParams[key] = val;

		}

	}

	return queryParams[lookup];

}


