document.write("<div id=\"ghead\"><a href=\"http://www.google.com\"><img style=\"margin-top:2px;\" src=\"http://laradio247fm.com/abg-es-100c-ffffff.png\" border=\"0\" /></a></div>\n<div id=\"gads\"><a href=\"javascript:ChangePage()\"><img name=\"iads\" id=\"iads\" src=\"http://laradio247fm.com/googleads/images/casaperfecta.gif\" border=\"0\" /></a></div>\n");
// div head
var a = document.getElementById("ghead");
a.style.backgroundColor = "#F00";
a.style.width = "194px";
a.style.paddingLeft = "5px";

// div square
var g = document.getElementById("gads");
g.style.width = "195px";
g.style.height = "221px";
g.style.border = "solid 1px #F00";
/*g.style.backgroundImage = "url(http://laradio247fm.com/ocdem.jpg)";*/
var host = location.host;
var myImg = document.images["iads"];
myImg.style.width = "193px";
myImg.style.height = "auto";
//User defined variables - change these variables to alter the behaviour of the script
var ImageFolder = "http://laradio247fm.com/googleads/images"; //Folder name containing the images
var ImageFileNames = new Array('casaperfecta.gif','ocdem.jpg', 'sistema2030.jpg', 'laradio247.jpg', 'tonyromas.jpg'); //List of images to use
var ImageURLs = new Array('http://www.laradio247fm.com/ads/casaperfecta.jpg','http://www.ocdem.org', 'http://www.sistema2030.com',  'http://www.laradio247fm.com', 'http://www.tonyromas.com.do'); //List of hyperlinks associated with the list of images
var DefaultURL = ''; //Default hyperlink for the Banner Ad
var DisplayInterval = 15; //Number of seconds to wait before the next image is displayed
var TargetFrame = ""; //Name of the frame to open the hyperlink into

//Internal variables (do not change these unless you know what you are doing)
var IsValidBrowser = false;
var BannerAdCode = 0;
var BannerAdImages = new Array(NumberOfImages);
var DisplayInterval = DisplayInterval * 1000;
var NumberOfImages = ImageFileNames.length;

//Add a trailing forward slash to the ImageFolder variable if it does not already have one
if (ImageFolder.substr(ImageFolder.length - 1, ImageFolder.length) != "/" && ImageFolder != "") { ImageFolder += "/";
}

if (TargetFrame == '') {
var FramesObject = null;
} else {
var FramesObject = eval('parent.' + TargetFrame);
}

//Function runs when this page has been loaded and does the following:
//1. Determine the browser name and version  (since the script will only work on Netscape 3+ and Internet Explorer 4+).
//2. Start the timer object that will periodically change the image displayed by the Banner Ad.
//3. Preload the images used by the Banner Ad rotator script
function InitialiseBannerAdRotator() {

//Determine the browser name and version
//The script will only work on Netscape 3+ and Internet Explorer 4+
var BrowserType = navigator.appName;
var BrowserVersion = parseInt(navigator.appVersion);

if (BrowserType == "Netscape" && (BrowserVersion >= 3)) {
IsValidBrowser = true;
}

if (BrowserType == "Microsoft Internet Explorer" && (BrowserVersion >= 4)) {
IsValidBrowser = true;
}

if (IsValidBrowser) {
TimerObject = setTimeout("ChangeImage()", DisplayInterval);
BannerAdCode = 0;

for (i = 0; i < NumberOfImages; i++) {
BannerAdImages[i] = new Image();
BannerAdImages[i].src = ' ' + ImageFolder + ImageFileNames[i];
}
}
// a = head, g = square
switch(host)
{
	case "www.disco89fm.com":
		a.style.width = "142px";
		a.style.backgroundColor = "#F00";
		g.style.width = "145px";
		g.style.height = "164px";
		g.style.border = "solid 1px #F00";
		myImg.style.width = "145px";
		myImg.style.height = "auto";
	break;
	case "www.comando88fm.com":
		a.style.width = "154px";
		g.style.width = "156px";
		a.style.backgroundColor = "#730000";
		g.style.border = "solid 1px #730000";
		g.style.height = "175px";
		myImg.style.width = "154px";
		myImg.style.height = "auto";
	break;
	case "www.primera88.com":
		a.style.width = "178px";
		g.style.width = "181px";
		g.style.height = "205px";
		myImg.style.width = "181px";
		myImg.style.height = "auto";
	break;
	case "www.hits92fm.com":
		a.style.width = "180px";
		a.style.backgroundColor = "#777777";
		g.style.width = "183px";
		g.style.height = "207px";
		g.style.border = "solid 1px #777777";
		myImg.style.width = "183px";
		myImg.style.height = "auto";
	break;
	case "www.lan103.net":
		a.style.width = "168px";
		a.style.backgroundColor = "#015783";
		g.style.width = "171px";
		g.style.height = "192px";
		g.style.border = "solid 1px #015783";
		myImg.style.width = "171px";
		myImg.style.height = "auto";
	break;
	case "www.mega102.net":
		a.style.width = "168px";
		a.style.backgroundColor = "#FA9814";
		g.style.width = "171px";
		g.style.height = "193px";
		g.style.border = "solid 1px #FA9814";
		myImg.style.width = "171px";
		myImg.style.height = "auto";
	break;
	case "www.criolla106fm.com":
		a.style.width = "165px";
		a.style.backgroundColor = "#015783";
		g.style.width = "168px";
		g.style.height = "190px";
		g.style.border = "solid 1px #015783";
		myImg.style.width = "168px";
		myImg.style.height = "auto";
	break;
	case "www.laradio247fm.com":
		a.style.width = "150px";
		a.style.backgroundColor = "#015783";
		g.style.width = "153px";
		g.style.height = "172px";
		g.style.border = "solid 1px #015783";
		myImg.style.width = "152px";
		myImg.style.height = "auto";
	break;
	case "lakalle96.com":
		a.style.width = "160px";
		a.style.backgroundColor = "#015783";
		g.style.width = "163px";
		g.style.height = "184px";
		g.style.border = "solid 1px #015783";
		myImg.style.width = "163px";
		myImg.style.height = "auto";
	break;
	case "www.radioideal995.com":
		a.style.width = "160px";
		a.style.backgroundColor = "#98A664";
		g.style.width = "164px";
		g.style.height = "182px";
		g.style.border = "solid 1px #ffffff";
		myImg.style.width = "164px";
		myImg.style.height = "auto";
	break;
	default:
	break;
}
}

//Function to change the src of the Banner Ad image
function ChangeImage() {

if (IsValidBrowser) {
BannerAdCode = BannerAdCode + 1;

if (BannerAdCode == NumberOfImages) {
BannerAdCode = 0;
}

window.document.iads.src = BannerAdImages[BannerAdCode].src;
TimerObject = setTimeout("ChangeImage()", DisplayInterval);
}
}

//Function to redirect the browser window/frame to a new location,
//depending on which image is currently being displayed by the Banner Ad.
//If Banner Ad is being displayed on an old browser then the DefaultURL is displayed
function ChangePage() {

if (IsValidBrowser) {

if (TargetFrame != '' && (FramesObject)) {
FramesObject.location.href = ImageURLs[BannerAdCode];
} else {
document.location = ImageURLs[BannerAdCode];
}

} else if (!IsValidBrowser) {
//document.location = DefaultURL;
FramesObject.location.href = ImageURLs[BannerAdCode];
} else {
document.location = ImageURLs[BannerAdCode];
}

}
InitialiseBannerAdRotator();