var isCompose=((document.location.pathname).indexOf('compose.mail')!=-1 || (document.location.pathname).indexOf('Outblaze.mail')!=-1)? true:false;
var isAfterSent=((document.location.pathname).indexOf('aftersent.main')!=-1)? true:false;
var isWelcome=((document.location.pathname).indexOf('frontpage.main')!=-1)? true:false;
var isReadmail=((document.location.pathname).indexOf('read.mail')!=-1)? true:false;
var isMailbox=((document.location.pathname).indexOf('mailbox.mail')!=-1)? true:false;

function ads(aID) 
{
	var area = "ROS_Html";
	if(isWelcome)   area="Welcome_Html";
	if(isMailbox)   area="Inbox_Html";
	if(isReadmail)  area="MessageRead_Html";
	if(isAfterSent) area="MessageSent_Html";
	if(isCompose)   area="Compose_Html";

	switch (aID) 
	{
		case "728x90_top":    document.writeln('<iframe src="http://www.mail.com/content/jscontrols/ads.aspx?zonename='+area+'&tile=1&dcopt=ist&width=728&height=90" width="728" height="90" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling=no borderCOLOR="#000000"><\/iframe>');break;
		case "728x90_bottom": document.writeln('<iframe src="http://www.mail.com/content/jscontrols/ads.aspx?zonename='+area+'&tile=2&width=728&height=90" width="728" height="90" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling=no borderCOLOR="#000000"><\/iframe>');break;
		case "300x250_left":  document.writeln('<iframe src="http://www.mail.com/content/jscontrols/ads.aspx?zonename='+area+'&tile=1&width=300&height=250" width="300" height="250" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling=no borderCOLOR="#000000"><\/iframe>');break;
		case "300x250_right": document.writeln('<iframe src="http://www.mail.com/content/jscontrols/ads.aspx?zonename='+area+'&tile=2&width=300&height=250" width="300" height="250" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling=no borderCOLOR="#000000"><\/iframe>');break;
		case "300x250":       document.writeln('<iframe src="http://www.mail.com/content/jscontrols/ads.aspx?zonename='+area+'&width=300&height=250" width="300" height="250" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling=no borderCOLOR="#000000"><\/iframe>');break;
		case "425x600":       document.writeln('<iframe src="http://www.mail.com/content/jscontrols/ads.aspx?zonename='+area+'&width=425&height=600" width="425" height="600" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling=no borderCOLOR="#000000"><\/iframe>');break;
		case "125x125":       document.writeln('<iframe src="http://www.mail.com/content/jscontrols/ads.aspx?zonename='+area+'&width=125&height=125" width="125" height="125" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling=no borderCOLOR="#000000"><\/iframe>');break;
		case "160x600":	      document.writeln('<iframe src="http://www.mail.com/content/jscontrols/ads.aspx?zonename='+area+'&width=160&height=600" width="160" height="600" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling=no borderCOLOR="#000000"><\/iframe>');
	}
}

function sac_banner(str)
{
	str = str.toLowerCase();
	if(str.indexOf("728x90")!=-1)  ads("728x90_top");
	if(str.indexOf("468x60")!=-1)  ads("728x90_bottom");
	if(str.indexOf("300x250")!=-1) ads("300x250");
	if(str.indexOf("125x125")!=-1) ads("125x125");
	if(str.indexOf("120x600")!=-1) ads("160x600");
	if(str.indexOf("160x600")!=-1) ads("160x600");
}

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

var vsiJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("%3Cscript src='" + vsiJsHost + "cdn.mail.com/partner/outblaze/scripts/cobrand.js' type='text/javascript'%3E%3C/script%3E"));

document.write(unescape("%3Cscript src='http://img1.us4.outblaze.com/mail.com/js/vsi.js' type='text/javascript'%3E%3C/script%3E"));
