//=======================================================================================================
//-------------------------------------------------------------------------------------------------------
//	Custom Javascript functions
//-------------------------------------------------------------------------------------------------------
//=======================================================================================================
	function printmto(domain,address,tld)
	{
		document.write("<a href=\"mailto");
  		document.write(":" + address + "@");
		document.write( domain + "\">" + address + "@" + domain + "." + tld +  "<\/a>");
	}
	
	function printm2(domain,address,tld)
	{
		document.write("<a href=\"mailto");
  		document.write(":" + address + "@");
		document.write( domain + "\">");
	}
	
	$(document).ready(function() {

	    //  Init share popup
	    $(function() {
	        $(".share-button").live('click', function(event) {
	            $(".share-list").slideFadeToggle()
	            return false;
	        });

	        $(".share-list-close").live('click', function() {
	            $(".share-list").slideFadeToggle();
	            return false;
	        });
	    });

	     $.fn.slideFadeToggle = function(easing, callback) {
	        return this.animate({ opacity: 'toggle', height: 'toggle' }, "fast", easing, callback);
	    };

	});
	
	function openPopup(content,target)
	{
		sizeX	  = 600;
		sizeY	  = 600;

		//	Center the window
		leftpos	= (screen.width)  ? (screen.width-sizeX)/2 : 100;
		toppos	= (screen.height) ? (screen.height-sizeY)/2 : 100;

		//	Define the window size
		widthVar  = 'width=' + sizeX + ',';
		heightVar = 'height=' + sizeY + ',';

		//	Open the window
		winobject				= window.open(content,target,"menubar=0,statusbar=0,scrollbars=0,toolbar=0,location=0," + widthVar + heightVar + "left=" + leftpos + ",top=" + toppos + ",resizable=0" );
		contentwindows[target]	= winobject;
		winobject.focus();
	}
	
