//________________________________________________
function init(){
	
	var emailInput_h		= document.getElementById('email');
	
	if(emailInput_h){
		emailInput_h.onfocus 	= function(){handleFocus(true);};
		emailInput_h.onblur 	= function(){handleFocus(false);};
	}
	
	//--------------------------------------------
	function handleFocus(highlight_bool){
		
		emailInput_h.setAttribute('highlighted',highlight_bool);
		if(highlight_bool){
			emailInput_h.focus();
			emailInput_h.select();
		}
	};
	//--------------------------------------------
};
//________________________________________________
function submitLink(target_str,encodedLink_str,encodedTitle_str){
	
	var width_int		= 700;
	var height_int		= 400;
	switch(target_str){
		case 'delicious':
			var href_str= 'http://del.icio.us/post?v=4&noui&jump=close&url='+encodedLink_str+'&title='+encodedTitle_str;
			break;
		case 'digg':
			width_int	= 800;
			height_int	= 800;
			href_str	= 'http://digg.com/submit?phase=2&url='+encodedLink_str+'&title='+encodedTitle_str;
			break;
		case 'reddit':
			href_str	= 'http://reddit.com/submit?url='+encodedLink_str+'&title='+encodedTitle_str;
			break;
	}
	var win		= window.open(href_str, 'popup','toolbar=no,width='+width_int+',height='+height_int); 
	win.focus();
	
	return false;
};
//________________________________________________
function popupImage(url_str,width_int,height_int,title_str){
	
	var targetURL_str	= '/_components/popupImage.htm?href='+encodeURIComponent(url_str)+'&title='+encodeURIComponent(title_str);
	var w 				= window.open(targetURL_str, 'image','toolbar=no,menu=no,width='+width_int+',height='+height_int); 
	w.focus();
	return false;
};
//________________________________________________