//-------------------------
//-- Utilities Functions --
//-------------------------
function openWin(windowUrl, windowName, windowFeatures) {
	var oChildWindow = window.open(windowUrl, windowName, windowFeatures) ;
	return oChildWindow ;
}


//------------------------------------------------
//-- function which generates an email template --
//------------------------------------------------
function generateEmailTemplate(blogId, hashCode, emailContribution){							
	if (hashCode != ''){
		emailType = "Create";
		additionalComment = "";
		var messageSubject = emailType + " a contribution for Hub object " + blogId + " : <" + hashCode + ">";
		var messageBody = "<ObjectName>Object Name</ObjectName>%0D%0D" ;
		messageBody = messageBody + "<ShortDescription>Short description</ShortDescription>%0D%0D";
		messageBody = messageBody + "<LongDescription>Long Description</LongDescription>%0D%0D";			
		messageBody = messageBody + "// Optionaly, attach " + additionalComment + "the linked file to this mail";						
		var url="mailto:" + emailContribution + "?subject=" + messageSubject + "&body=" + messageBody;		
		location.href=url; 
	}
}
