var path="";
function getMailtoText()
{
  var bodyText = 'Check this interesting news from Al Inma Bank ' + window.location + ' &#13;&#10;';
  document.getElementById('sendMailLink').href = 'mailto:?subject=Interesting Al Inma Bank News&body='+ bodyText;

}

function sendInmaWebsiteToFriend()
{
  var inmaWebsite = 'http://www.alinma.com';	
  var bodyText = 'Check Al Inma Bank website : ' + inmaWebsite + ' &#13;&#10;';
  document.getElementById('sendMailLink').href = 'mailto:?subject=Al Inma Bank website&body='+ bodyText;

}


function sendMailByWCM(mailPath)
{
  //var inmaWebsite = 'http://www.alinma.com';	
  //var bodyText = 'Check Al Inma Bank website : ' + inmaWebsite + ' &#13;&#10;';
  //document.getElementById('sendMailLink').href = 'mailto:?subject=Al Inma Bank website&body='+ bodyText;
  
  window.open(mailPath,"_blank",'height=600,width=385');

}

function getMail(contentLink)
{
	  var bodyMail = 'Check this interesting news from Al Inma Bank ' + contentLink + ' &#13;&#10;';
  document.getElementById('sendMailLink').href = 'mailto:?subject=Interesting Al Inma Bank News&body='+ bodyMail;

}


function printNews() {
  window.open(path,"_blank");
  //window.print();
}

function toolTipLinks(contentLink, contentPrint){
var position = contentLink.indexOf('+');
if (position == -1)
path=contentPrint;
else
path=contentPrint.substring(0, position) + contentPrint.substring(position);

	 var bodyMail1 = 'Check this interesting news from Al Inma Bank ' + contentLink + ' &#13;&#10;';
var test = '<tr><td><a href="#" onClick="printNews()">Print</a><td><a href=\'mailto:?subject=Interesting Al Inma Bank News&body= '+ bodyMail1 + '\'>Send to friend</a></td></tr>';

return test;
}


function toolTipLinksArabic(contentLink, contentPrint){
var position = contentLink.indexOf('+');
if (position == -1)
path=contentPrint;
else
path=contentPrint.substring(0, position) + contentPrint.substring(position);

	 var bodyMail1 = 'Check this interesting news from Al Inma Bank ' + contentLink + ' &#13;&#10;';
var test = '<tr><td><a href="#" onClick="printNews()">\u0627\u0637\u0628\u0639</a><td><a href=\'mailto:?subject=Interesting Al Inma Bank News&body= '+ bodyMail1 + '\'>\u0623\u0631\u0633\u0644\u0020\u0644\u0635\u062f\u064a\u0642</a></td></tr>';

return test;
}

//Added by Christina
function sendMail(contentLink,contentPrint) {
var position = contentLink.indexOf('+');
if (position == -1){
    path=contentPrint;
}
else
{
	path=contentPrint.substring(0, position) + contentPrint.substring(position);
}
  window.open(path,"_blank",'height=600,width=385');
//  window.print();

}


//Addded Yahya
function sendMailWithLocale(contentLink,contentPrint,language) {
var position = contentLink.indexOf('+');
if (position == -1){
    path=contentPrint;
}
else
{
	path=contentPrint.substring(0, position) + contentPrint.substring(position);
	
}
path = path + "&language=" +language;
window.open(path,"_blank",'height=600,width=385');
}

//Addded Yahya
// This function is called when user clicks the "Send Mail" blue icon that appears always on the bottom right corener
// it will send an email with Al Inma Bank website addrees
function sendHomePageByEMail(language) {

var sendMailURL = "/Send_Mail/AlinmaMail.jsp"
var MyWidth = (window.screen.width/2)-(193);
var MyHeight = (window.screen.height/2)-(265+10);
sendMailURL = sendMailURL + "?language=" +language;
window.open(sendMailURL,"_blank",'height=530,width=385,top='+MyHeight+',left='+MyWidth);
}

//Added by Yahya
function printContent(contentLink,contentPrint) {
var position = contentLink.indexOf('+');
if (position == -1){
    path=contentPrint;
}else
{
	path=contentPrint.substring(0, position) + contentPrint.substring(position);
}
  window.open(path,"_blank",'height=700,width=800,resizable=1,scrollbars=yes,top=50,left=300');
//  window.print();

}
