//scripts.js

//bookmark this page
var urlAddress = "http://www.zwebcommurce.com";
var pageName = "Ecommerce Shopping Cart Software Solution, Content Management Systems";
function addbookmark() {
	if (window.external){
		window.external.AddFavorite(urlAddress,pageName)
	}else{ 
		alert("Sorry! Your browser doesn't support this function.");
	}
}


//address hide functions
function makeaddy(name,domain,tld)
{
	var at = "@";
	var addy = domain;
	var dot = "."
	var com = tld
	location.href='mailto:'+name+at+addy+dot+com;
}
function makeaddy2(name)
{
	var at = "@";
	var addy = "zunch";
	var dot = "."
	var com = "com"
	location.href='mailto:'+name+at+addy+dot+com;
}

//variables for javascript email to a friend script:
var sSubject = 'Interesting Web Page';
var sBody    = 'Hey,\n\n There\'s a page at zWebCommurce.com that I think you might find interesting.\n Zunch is an interactive services and application development firm out of Dallas.\n\n Here\'s the link to that page:' + location.href;
var sDisplay = 'Email This Page';

function mailpage()
{
	mail_str = "mailto:?subject=Interesting Web Page";
	mail_str += "&body=" + sBody;
	location.href = mail_str;
}



//menus
function show( id )
{
	document.getElementById(id).style.display = 'block'; 
}
		
function hide( id )
{
	document.getElementById(id).style.display = 'none'; 
}

function showSubMenu( id )
{
	document.getElementById(id).style.display = 'block'; 
}
		
function hideSubMenu( id )
{
	document.getElementById(id).style.display = 'none';
}

//popup
function popup(theURL, Name, popW, popH, scroll) {
	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',resizable'
	Win = window.open(theURL, Name, winProp)
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
}
