// FUNCTION TO COMPOSE EMAIL ADDRESSES
function mail(account,domain) {
	window.location = "mailto:" + account + "@" + domain;
}

// FUNCTION TO OPEN MW CREDIT WINDOW
function credit() {
	if(confirm("Mike Wilkinson provides website design for a variety\nof clients throughout Southern California and\nbeyond. Please click \"OK\" for more information.")) {
		window.open("http://websites-graphics.biz/", "", "top=0,left=0,resizable,scrollbars,status,location,toolbar,menubar");
	}
	return false;
}

// SCRIPT TO OPEN ONE NEW WINDOW AT A TIME WITH A PHOTO
/*****************************************************************************

Access this script by enclosing a thumbnail photo in an anchor link like this:

<a href="index.htm" onclick="openWindow('v','../images/photo1.jpg'); return false">
<img src="images/job_photos/photo1_thumb.jpg" alt="Photo 1" />
</a>

In the above example, after "openWindow," 'v' is used for vertical photos,
'h' should be used for horizontal photos

******************************************************************************/

photoWindow = new Object;
photoWindow.closed = true;

function openWindow(orientation,photoName) {

	if(!photoWindow.closed) {
		photoWindow.close();
	}

	var width = 660;
	var height = 510;

	if(orientation == "v") {
		width = 500;
		height = 670;
	}
	
	photoWindow = window.open(photoName,"","top=0,left=0,width=" + width + ",height=" + height);
}

// SCRIPT TO OPEN ONE NEW WINDOW AT A TIME WITH A PHOTO AND A LINK TO A SPECIFIC PRODUCT
/***************************************************************************************

Access this script by enclosing a thumbnail photo in an anchor link like this:

<a href="index.htm" onclick="popUpWindow('v','http://sepulveda.com/images/photos_pop_up/photo1.jpg','541','99','More Information'); return false">
<img src="images/job_photos/photo1_small.jpg" alt="Photo 1" />
</a>

In the above example, after "popUpWindow," 'v' is used for vertical photos,
'h' should be used for horizontal photos

****************************************************************************************/

popUp = new Object;
popUp.closed = true;

function popUpWindow(orientation,photoPath,product,category,linkText) {

	if(!popUp.closed) {
		popUp.close();
	}

	var width = 660;
	var height = 530;

	if(orientation == "v") {
		width = 500;
		height = 690;
	}

var URL = "http://sepulveda2.com/pop_up.php?photoPath=" + photoPath + "&product=" + product + "&category=" + category + "&linkText=" + linkText;	
	popUp = window.open(URL,"","top=0,left=0,width=" + width + ",height=" + height);
}

// SCRIPT TO OPEN ONE NEW WINDOW AT A TIME WITH A PHOTO AND A LINK TO A SPECIFIC PRODUCT IN THE PRODUCTS FOLDER
/***************************************************************************************

Access this script by enclosing a thumbnail photo in an anchor link like this:

<a href="index.htm" onclick="popUpWindow('v','http://sepulveda.com/images/photos_pop_up/photo1.jpg','541','99','More Information'); return false">
<img src="images/job_photos/photo1_small.jpg" alt="Photo 1" />
</a>

In the above example, after "popUpWindow," 'v' is used for vertical photos,
'h' should be used for horizontal photos

****************************************************************************************/

popUpProduct = new Object;
popUpProduct.closed = true;

function popUpProd(orientation,photoPath,product,category,linkText) {

	if(!popUpProduct.closed) {
		popUpProduct.close();
	}

	var width = 660;
	var height = 530;

	if(orientation == "v") {
		width = 500;
		height = 670;
	}

var URL = "http://sepulveda2.com/pop_up_product.php?photoPath=" + photoPath + "&product=" + product + "&category=" + category + "&linkText=" + linkText;	
	popUpProduct = window.open(URL,"","top=0,left=0,width=" + width + ",height=" + height);
}

// SCRIPT TO OPEN ONE NEW WINDOW AT A TIME WITH A PHOTO AND A LINK TO A CATEGORY
/***************************************************************************************

Access this script by enclosing a thumbnail photo in an anchor link like this:

<a href="index.htm" onclick="popUpWindow('v','http://sepulveda.com/images/photos_pop_up/photo1.jpg','108','More Information'); return false">
<img src="images/job_photos/photo1_small.jpg" alt="Photo 1" />
</a>

In the above example, after "popUpWindow," 'v' is used for vertical photos,
'h' should be used for horizontal photos

108 is the category number

****************************************************************************************/

popUpCat = new Object;
popUpCat.closed = true;

function popUpCategory(orientation,photoPath,category,linkText) {

	if(!popUpCat.closed) {
		popUpCat.close();
	}

	var width = 660;
	var height = 530;

	if(orientation == "v") {
		width = 500;
		height = 670;
	}

var URL = "http://sepulveda2.com/pop_up_category.php?photoPath=" + photoPath + "&category=" + category + "&linkText=" + linkText;	
	popUp = window.open(URL,"","top=0,left=0,width=" + width + ",height=" + height);
}
