<!-- Hide script from old browsers

// Make sure file is not hosted in a different frameset

if ( top.location.href != window.location.href )
  { top.location.href=window.location.href }

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


	// **********************************
	// MV Stats
	// **********************************

if (document.location.href.indexOf("www.metavisia.com") >= 0)
{	
		// Get statistics information
	var getRef = getQueryVariable("ref");	
		
	var image = new Image;
	var sSrc='http://www.metavisia.com/mvstats/stats.php?sScrRes=' + 
		window.screen.width + 'x'+ window.screen.height + '&iColorDepth='+ screen.colorDepth 
		+ '&sURL='+document.location.href+'&sReferrer='+ document.referrer+'&ispecref=' + getRef;
	escape(sSrc);
	image.src=sSrc;
}

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


function openWindow(url, w, h) {
    var windowprops = "width=" + w + ",height=" + h + ",,left=100,top=100,scrollbars=no,status=yes,toolbar=no,location=no,directories=no,resizable=no";
      popup = window.open(url,'newWin',windowprops);
      popup.close();
      popup = window.open(url,'newWin',windowprops);
      popup.focus();
} 

function openDetails(url, w, h) {
    var windowdetails = "width=" + w + ",height=" + h + ",,left=100,top=100,scrollbars=no,status=yes,toolbar=no,location=no,directories=no,resizable=no";
      details = window.open(url,'newWinD',windowdetails);
      details.close();
      details = window.open(url,'newWinD',windowdetails);
      details.focus();
}
    
function openPicture(pic,w,h) {
 
	var windowprops = "left=160,top=100,scrollbars=no,status=no,toolbar=no,location=no,directories=no,resizable=no,width=" + w + ",height=" + h;
      
	picture = window.open('','newPicture',windowprops);
	picture.close();
    picture = window.open('','newPicture',windowprops);  
    picture.focus();
    
	picture.document.write("<html><head><title>Picture<\/title><\/head><body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>")
	picture.document.writeln("<table border=0 cellpadding=0 cellspacing=0 width=100% height=100% bgcolor=#E7E9EE><tr><td valign=center align=center>")
	picture.document.writeln("<img src=" + pic + " width=" + w + " height=" + h + ">")
	picture.document.writeln("</td></tr></table>")
	picture.document.write("<\/body><\/html>")
}  

function openFlash(pic,w,h) {
 
	var windowprops = "left=160,top=100,scrollbars=no,status=no,toolbar=no,location=no,directories=no,resizable=yes,width=" + w + ",height=" + h;
      
	picture = window.open('','newPicture',windowprops);
	picture.close();
    picture = window.open('','newPicture',windowprops);  
    picture.focus();
    
	picture.document.write("<html><head><title>Picture<\/title><\/head><body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>")
	picture.document.writeln("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width=" + w + " height=" + h + ">")
	picture.document.writeln("<PARAM NAME=movie VALUE=" + pic + ">")
	picture.document.writeln("<PARAM NAME=menu VALUE=false>")
	picture.document.writeln("<PARAM NAME=quality VALUE=high>")
	picture.document.writeln("<EMBED src=" + pic + " menu=false quality=high WIDTH=" + w + " HEIGHT=" + h + " TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED>")
	picture.document.writeln("</OBJECT>")
	picture.document.write("<\/body><\/html>")
}              

function openPlayerWindow(url, w, h) {
    var windowprops = "width=" + w + ",height=" + h + ",,left=10,top=10,scrollbars=on,status=no,toolbar=no,location=no,directories=no,resizable=no";
      popup = window.open(url,'PlayerWindow',windowprops);
      
}

function copyrightYear(startYear)
	{
		d = new Date();
		
		if (startYear != d.getFullYear())
			{
			return startYear + " - " + d.getFullYear();
			}
		else
			{
			return startYear;
			}
	}
	

function validEmail(email)
{
		
	if ((email.length < 3) || (email.length > 50) || 
		(email.charAt(0) == '@') || (email.charAt(email.length-1) == '@') || 
		(email.charAt(0) == '.') || (email.charAt(email.length-1) == '.') || 
		(email.indexOf('.') == -1) || (email.indexOf('@') == -1) ||
		(email.indexOf('@') != email.lastIndexOf('@')) || 
		(email.indexOf(' ') > 0) || (email.indexOf('?') > 0) || (email.indexOf('..') > 0)
		)
	{
		return false;
	}
	else
	{
		return true;
	}
}

function verifyEmailForm(eForm, checkBudget)
{
	if (eForm.name.value=="")
	{
		alert("Please, enter your name.");
		eForm.name.focus();
		return false;
	}

	if (eForm.email.value=="")
	{
		alert("Please, enter your e-mail address. We'll need it to reply to your message.");
		eForm.email.focus();
		return false;
	}
	
	if (eForm.phone.value=="")
	{
		alert("Please, enter your phone number. We'll need it to contact you back if there's a problem with the e-mail.");
		eForm.email.focus();
		return false;
	}
	
	if (!validEmail(eForm.email.value))
	{
		alert("The e-mail address you've entered is not valid. Please, make sure you've typed it correctly.");
		eForm.email.focus();
		return false;
	}
	
	
	
	if (checkBudget == true)
	{
		if (eForm.budget.value=="0")
		{
			alert("Please, specify your budget.");
			eForm.budget.focus();
			return false;
		}
	}
	
	if (eForm.budgettxt.value=="")
	{
		alert("Please, specify how much do you plan to spend on your project. That will help us to find the most effective solution for you.");
		eForm.budgettxt.focus();
		return false;
	}
	
	
	if (eForm.message.value=="")
	{
		alert("Please, type your message.");
		eForm.message.focus();
		return false;
	}
				
	return true;
}

function verifyRefferForm(form)
{
	if (form.YourName.value == "")
	{
		alert("Please, enter your name.");
		form.YourName.focus();
		return false;
	}

	if (form.YourEmail.value == "")
	{
		alert("Please, enter your e-mail address.");
		form.YourEmail.focus();
		return false;
	}
	
	if (!validEmail(form.YourEmail.value))
	{
		alert("Your e-mail address you've entered is not valid. Please, make sure you've typed it correctly.");
		form.YourEmail.focus();
		return false;
	}
	
	var friendInfoEntered = false;
	
	if (form.FirstName.value != "" || form.FirstEmail.value != "")
	{
		if (form.FirstName.value == "")
		{
			alert("Please, enter your friend's name.");
			form.FirstName.focus();
			return false;
		}
	
		if (form.FirstEmail.value == "")
		{
			alert("Please, enter your friend's e-mail address.");
			form.FirstEmail.focus();
			return false;
		}
		
		if (!validEmail(form.FirstEmail.value))
		{
			alert("Your friend's e-mail address you've entered is not valid. Please, make sure you've typed it correctly.");
			form.FirstEmail.focus();
			return false;
		}
		
		friendInfoEntered = true;
	}
	
	if (!friendInfoEntered)
	{
		alert("Please, enter contact information for your friend.");
		form.FirstName.focus();
		return false;
	}
		
	if (form.Message.value == "")
	{
		alert("Please, type your message.");
		form.Message.focus();
		return false;
	}
	
	if (form.Message.value.length > 3000)
	{
		alert("Your message cen not be longer than 3000 characters. Please, enter shorter message.");
		form.Message.focus();
		return false;
	}
				
	return true;
}



/**
 * Sets a Cookie with the given name and value.
 *
 * name       Name of the cookie
 * value      Value of the cookie
 * [expires]  Expiration date of the cookie (default: end of current session)
 * [path]     Path where the cookie is valid (default: path of calling document)
 * [domain]   Domain where the cookie is valid
 *              (default: domain of calling document)
 * [secure]   Boolean value indicating if the cookie transmission requires a
 *              secure transmission
 */
function setCookie(name, value, expires, path, domain, secure)
{
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

/**
 * Gets the value of the specified cookie.
 *
 * name  Name of the desired cookie.
 *
 * Returns a string containing value of specified cookie,
 *   or null if cookie does not exist.
 */
function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

/**
 * Deletes the specified cookie.
 *
 * name      name of the cookie
 * [path]    path of the cookie (must be same as path used to create cookie)
 * [domain]  domain of the cookie (must be same as domain used to create cookie)
 */
function deleteCookie(name, path, domain)
{
    if (getCookie(name))
    {
        document.cookie = name + "=" + 
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}

// *************************************************
// Get variable from query string
// *************************************************
function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) 
  {
    var pair = vars[i].split("=");
    if (pair[0] == variable) 
    {
      return pair[1];
    }
    
  } 
  
  return "";
  
}



 	// End hiding script from old browsers -->