function dcAdvert(s,x,y) {

	//iframe based implementation
   document.write ("<IFRAME SRC='" + window.location.protocol + "//campaigns.moneyam.com/dcAdvert.php?unit="+ s + "' WIDTH=" + x + " HEIGHT=" + y + " FRAMEBORDER='no' BORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING='no'>");
    document.write("</IFRAME>");
}

function oasisAdvert(s,x,y,usejs) {

	adServerBaseURL = "http://campaigns.moneyam.com/";
	
	//javascript based implementation
	if (usejs == 1) {
		document.write ('<SCRIPT type="text/javascript" SRC="http://campaigns.moneyam.com/oasisi-j.php?s='+s+'&w='+x+'&h='+y+'&t=_blank"> </SCRIPT> <NOSCRIPT> <A HREF="http://campaigns.moneyam.com/oasisc.php?s='+s+'&w='+x+'&h='+y+'&t=_blank"><IMG SRC="http://campaigns.moneyam.com/oasisi.php?s='+s+'&w='+x+'&h='+y+'&t=_blank" WIDTH='+x+' HEIGHT='+y+' BORDER=0></A> </NOSCRIPT>');
	}
	//iframe based implementation
	else {
		document.write ("<NOLAYER>");
		document.write ("<IFRAME SRC='" + adServerBaseURL + "oasisi-i.php?s=" + s + "&w=" + x + "&h=" + y + "&t=_blank' WIDTH=" + x + " HEIGHT=" + y + " FRAMEBORDER='no' BORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING='no'>");
		document.write("<A HREF='" + adServerBaseURL + "oasisc.php?s=" + s + "&w=" + x + "&h=" + y + "&t=_blank' TARGET='_blank'>");
		document.write("<IMG SRC='" + adServerBaseURL + "oasisi.php?s=" + s + "&w=" + x + "&h=" + y + "&t=_blank' BORDER=0 WIDTH=" + x + " HEIGHT=" + y + ">");
		document.write("</A>");
		document.write("</IFRAME>");
		document.write("</NOLAYER>");
		document.write("<ILAYER ID='layer" + s + "' VISIBILITY='hidden' WIDTH=" + x + " HEIGHT=" + y + "></ILAYER>");
		document.write("<LAYER SRC='" + adServerBaseURL + "oasisi.php?s=" + x + "&w=" + x + "&h=" + y + "&t=_blank' WIDTH=" + x + " HEIGHT=" + y + " VISIBILITY='hidden' ");
		document.write("onLoad='moveToAbsolute(layer" + s + ".pageX,layer" + s + ".pageY);clip.height=" + y + ";clip.width=" + x + ";visibility='show';></LAYER>");
	}
}

function oasisSSLAdvert(s,x,y) {

		adServerBaseURL = "https://campaigns.moneyam.com/";

	document.write ("<NOLAYER>");
	document.write ("<IFRAME SRC='" + adServerBaseURL + "oasisi-i.php?s=" + s + "&w=" + x + "&h=" + y + "&t=_blank' WIDTH=" + x + " HEIGHT=" + y + " FRAMEBORDER='no' BORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING='no'>");
	document.write("<A HREF='" + adServerBaseURL + "oasisc.php?s=" + s + "&w=" + x + "&h=" + y + "&t=_blank' TARGET='_blank'>");
	document.write("<IMG SRC='" + adServerBaseURL + "oasisi.php?s=" + s + "&w=" + x + "&h=" + y + "&t=_blank' BORDER=0 WIDTH=" + x + " HEIGHT=" + y + ">");
	document.write("</A>");
	document.write("</IFRAME>");
	document.write("</NOLAYER>");
	document.write("<ILAYER ID='layer" + s + "' VISIBILITY='hidden' WIDTH=" + x + " HEIGHT=" + y + "></ILAYER>");
	document.write("<LAYER SRC='" + adServerBaseURL + "oasisi.php?s=" + x + "&w=" + x + "&h=" + y + "&t=_blank' WIDTH=" + x + " HEIGHT=" + y + " VISIBILITY='hidden' ");
	document.write("onLoad='moveToAbsolute(layer" + s + ".pageX,layer" + s + ".pageY);clip.height=" + y + ";clip.width=" + x + ";visibility='show';></LAYER>");
}

function changeAd(oasis_url) {
    frames["terminalAdFrame"].location.href = oasis_url;
    setTimeout("changeAd('" + oasis_url + "')", 90000);
}

function oasisTerminalAdvert(s,x,y) {
        var oasis_url = "http://campaigns.moneyam.com/oasisi-i.php?s=" + s + "&w=" + x + "&h=" + y + "&t=_blank";
	document.write("<IFRAME id='terminalAdFrame' name='terminalAdFrame' SRC='" + oasis_url + "' WIDTH=" + x + " HEIGHT=" + y + " FRAMEBORDER='no' BORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING='no'>");
	document.write("</IFRAME>");
        changeAd(oasis_url);
}

function changeAdRolling(oasis_url, name, timeout) {
/*	alert("2:" + name);
	alert("3:" + oasis_url);
	alert("4:" + timeout); */
    frames[name].location.href = oasis_url;
    setTimeout("changeAdRolling('" + oasis_url + "','" + name + "'," + timeout + ")", timeout);
}

function oasisAdRolling(s,x,y,name,timeout) {
        var oasis_url = "http://campaigns.moneyam.com/oasisi-i.php?s=" + s + "&w=" + x + "&h=" + y + "&t=_blank";
	document.write("<IFRAME id='" + name + "' name='" + name + "' SRC='" + oasis_url + "' WIDTH=" + x + " HEIGHT=" + y + " FRAMEBORDER='no' BORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING='no'>");
	document.write("</IFRAME>");
	
	/* alert("1:" + name); */
        changeAdRolling(oasis_url, name, timeout);  
}

