﻿
function openCenteredWindowNoScroll(url, height, width) {
	var left = Math.floor((screen.width - width) / 2);
	var top = Math.floor((screen.height - height) / 2);
	var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
	winParms += "," + "titlebar=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,alwaysRaised=yes,AlwaysOnTop=yes";
	popupWindow = window.open(url, "", winParms);
};

// Plugin to increaase/decrease the font size of a given element
(function ($) {
	$.fn.FontSize = function (increment, options) {
		options = jQuery.extend({
			speed: 'fast',
			easing: null,
			callback: null
		}, options);

		return this.each(function () {
			var obj = $(this);

			if (!obj.data('originalFontSize'))
				obj.data('originalFontSize', obj.css('font-size'));

			var newSize = obj.data('originalFontSize');

			if (newSize.indexOf('px') > 0)
				newSize = (parseFloat(newSize.replace('px', '')) + increment) + 'px';
			else if (newSize.indexOf('pt') > 0)
				newSize = (parseFloat(newSize.replace('pt', '')) + increment) + 'pt';
			else if (newSize.indexOf('em') > 0)
				newSize = (parseFloat(newSize.replace('em', '')) + increment) + 'em';
			else if (newSize.indexOf('%') > 0)
				newSize = (parseFloat(newSize.replace('%', '')) + increment) + '%';

			return obj.animate({ fontSize: newSize }, options.speed, options.easing, options.callback);
		});
	};
})(jQuery);

// jFav, JQuery plugin
(function ($) {
	$.fn.jFav = function (d) {
		var e = $.extend({},
		$.fn.jFav.defaults, d);
		var f = e.msg;

		this.each(function () {
			if (!$(this).attr('href') || $(this).attr('href') == "#") {
				$(this).attr('href', window.location.href);
			}
			if (!$(this).attr('title')) {
				$(this).attr('title', document.title);
			}
			if ($.browser.opera) {
				$(this).attr('link', $(this).attr('href')).attr('href', '').attr('href', 'javascript:void(0)').attr('onClick', '$.fn.jFav.OperaBookmark(this,"' + $(this).attr('title') + '","' + $(this).attr('link') + '")');
			} else {
				$(this).click(addToFavorites);
			}
		});

		function addToFavorites(a) {
			var b = $(this).attr('href');
			var c = $(this).attr('title');
			b = b.replace("file:///", "http://file/");
			if ($.browser.msie) {
				window.external.AddFavorite(b, c);
			} else if ($.browser.mozilla) {
				window.sidebar.addPanel(c, b, '');
			} else if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
				alert(f);
			} else if ($.browser.safari) {
				alert(f);
			}
			a.preventDefault();
		};
		return this;
	};

	$.fn.jFav.defaults = {
		msg: 'Press "Ctrl + D" or "CMD + D" for MAC, to add this page to your bookmarks.'
	};

	$.fn.jFav.OperaBookmark = function (e, a, b) {
		e.rel = "sidebar";
		e.title = a;
		e.href = "";
		e.href = b;
		e.click();
		return false;
	}
})(jQuery);

// code to initialize the DISQUS comments counters
function InitDisqusCommentsCount() {
	(function () {
		var s = document.createElement('script'); s.async = true;
		s.src = 'http://disqus.com/forums/zougla/count.js';
		(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
	} ());
};

// returns the VMXI token that corresponds to the given format
function GetVMIXTokenForFormat(mediaTokens, formatId) {
	for (i = 0; i < mediaTokens.length; i++) {
		if (mediaTokens[i].formatId == formatId)
			return mediaTokens[i].token;
	}
	return '';
};

// Embeds a player from the given media ID from VMIX into the element with the specified placeholderId, with the given width and height
function EmbedVmixVideo(placeholderId, mediaTokens, duration, width, height, flashVars) {
	$(document).ready(function () {
		if ((navigator.userAgent.toLowerCase().search("iphone") > -1) ||
				(navigator.userAgent.toLowerCase().search("ipod") > -1) ||
				(navigator.userAgent.toLowerCase().search("ipad") > -1)) {
			$.getJSON('http://cdn-akm.vmixcore.com/vmixcore/play/uvp?token=' + GetVMIXTokenForFormat(mediaTokens, '602') + '&output=jsonp&callback=?&expiration=1577858400', null, function (result) {
				$('#' + placeholderId).empty().append('<video src="' + result[0].play_url + '" width="' + width + '" height="' + (height - 32) + '" poster="' + result[0].thumbnail_url + '" controls="controls"></video>');
			});
		}
		else {
			var token = (duration > 600) ? GetVMIXTokenForFormat(mediaTokens, 'default') : GetVMIXTokenForFormat(mediaTokens, '5');

			$.getJSON('http://cdn-akm.vmixcore.com/vmixcore/play/uvp?token=' + token + '&output=jsonp&callback=?&expiration=1577858400', null, function (result) {
				flashVars.src = result[0].play_url;

				// var flashvars = { player_id: this.playerId, token: token, services_url: 'http://cdn-akm.vmixcore.com/core-flash/UnifiedVideoPlayer/cached-services.xml' };
				// Non-Akamized version
				// var flashvars = { player_id: this.playerId, token: token, services_url: 'http://cdn-akm.vmixcore.com/core-flash/UnifiedVideoPlayer/services.xml' };

				swfobject.embedSWF('/App_Themes/default/_flash/AdvertsAkamaiFlashPlayer.swf', placeholderId, width, height, '10.0.0', '/_js/expressInstall.swf',
					flashVars, { menu: "false", allowscriptaccess: "always", allowfullscreen: "true", wmode: "transparent", swliveconnect: "true" }, { id: placeholderId + '_swf', name: placeholderId + '_swf' });
			});
		}
	});
};

function EmbedVmixAudio(placeholderId, mediaTokens, duration) {
	$(document).ready(function () {
		if ((navigator.userAgent.toLowerCase().search("iphone") > -1) ||
				(navigator.userAgent.toLowerCase().search("ipod") > -1) ||
				(navigator.userAgent.toLowerCase().search("ipad") > -1)) {
			$.getJSON('http://cdn-akm.vmixcore.com/vmixcore/play?token=' + GetVMIXTokenForFormat(mediaTokens, '7') + '&output=jsonp&callback=?&expiration=1577858400', null, function (result) {
				$('#' + placeholderId).empty().append('<audio src="' + result[0].file + '" controls="controls"></audio>');
			});
		}
		else {
			$.getJSON('http://cdn-akm.vmixcore.com/vmixcore/play?token=' + GetVMIXTokenForFormat(mediaTokens, '7') + '&output=jsonp&callback=?&expiration=1577858400', null, function (result) {
				var mediaUrl = result[0].file;

				swfobject.embedSWF('/App_Themes/Default/_flash/mp3player.swf', placeholderId, 400, 60, '10.0.0', '/_js/expressInstall.swf',
					{ config: '%3Cmp3player%20version=%221%22%3E%3Cmusic%20url=%22' + mediaUrl + '%22%20urlencoded=%22false%22%20volume=%22100%22%20loop=%22false%22%20usecache=%22true%22%20buffer=%224%22%20autoplay=%22false%22%20/%3E%3Clayout%20id=%22custom%22%3E%3Citem%20id=%22playbar%22%20x=%2210%22%20y=%2210%22%20/%3E%3Citem%20id=%22playbutton%22%20x=%2210%22%20y=%2235%22%20/%3E%3Citem%20id=%22stopbutton%22%20x=%2260%22%20y=%2235%22%20/%3E%3Citem%20id=%22volumecontrol%22%20x=%22180%22%20y=%2238%22%20/%3E%3C/layout%3E%3Cstyles%3E%3CBackground%20backgroundColor=%22#CECED5%22%20useBevel=%22true%22%20bevelAlpha=%2270%22%20transparent=%22%22%20/%3E%3CButton%20themeColor=%22#46FF00%22%20useCustom=%22false%22%20customPlayPauseURL=%22%22%20customStopURL=%22%22%20/%3E%3CControlIcons%20backgroundColor=%22#6F7777%22%20/%3E%3CLoadBar%20backgroundColor=%22#FFFFFF%22%20borderColor=%22#C4CCCC%22%20fillColor=%22#5EBB4D%22%20/%3E%3CPlayBar%20backgroundColor=%22#F7F7F7%22%20outerBorderColor=%22#919999%22%20innerBorderColor=%22#C4CCCC%22%20fillColor=%22#7BFF4C%22%20fontSize=%2210%22%20color=%22#000000%22%20streamingText=%22%22%20pausedText=%22%22%20width=%22380%22%20/%3E%3CSliderThumbs%20backgroundColorOff=%22#6F7777%22%20backgroundColorOn=%22#46FF00%22%20/%3E%3CUIBorder%20borderColor=%22#666666%22%20borderWidth=%221%22%20/%3E%3CVolumeControl%20themeColorOff=%22#6F7777%22%20themeColorOn=%22#46FF00%22%20/%3E%3C/styles%3E%3C/mp3player%3E' },
					{ allowfullscreen: "false", quality: "high", wmode: "window", bgcolor: "#CECED5" },
					{ id: placeholderId + '_swf', name: placeholderId + '_swf' }
				);
			});
		}
	});
};

function EmbedAkamaiVideo(placeholderId, mediaUrl, width, height, flashVars) {
	$(document).ready(function () {
		if ((navigator.userAgent.toLowerCase().search("iphone") > -1) ||
				(navigator.userAgent.toLowerCase().search("ipod") > -1) ||
				(navigator.userAgent.toLowerCase().search("ipad") > -1)) {
			$('#' + placeholderId).empty().append('<video src="' + mediaUrl + '" width="' + width + '" height="' + (height - 31) + '" controls="controls"></video>');
		}
		else {
			swfobject.embedSWF('/App_Themes/default/_flash/AdvertsAkamaiFlashPlayer.swf', placeholderId, width, height, '10.0.0', '/_js/expressInstall.swf',
				flashVars, { allowfullscreen: "true", wmode: "opaque" }, { id: placeholderId + '_swf', name: placeholderId + '_swf' });
		}
	});
};

function EmbedAkamaiAudio(placeholderId, mediaUrl) {
	$(document).ready(function () {
		if ((navigator.userAgent.toLowerCase().search("iphone") > -1) ||
				(navigator.userAgent.toLowerCase().search("ipod") > -1) ||
				(navigator.userAgent.toLowerCase().search("ipad") > -1)) {
			$('#' + placeholderId).empty().append('<audio src="' + mediaUrl + '" controls="controls"></audio>');
		}
		else {
			swfobject.embedSWF('/App_Themes/Default/_flash/mp3player.swf', placeholderId, 400, 60, '10.0.0', '/_js/expressInstall.swf',
				{ config: '%3Cmp3player%20version=%221%22%3E%3Cmusic%20url=%22' + mediaUrl + '%22%20urlencoded=%22false%22%20volume=%22100%22%20loop=%22false%22%20usecache=%22true%22%20buffer=%224%22%20autoplay=%22false%22%20/%3E%3Clayout%20id=%22custom%22%3E%3Citem%20id=%22playbar%22%20x=%2210%22%20y=%2210%22%20/%3E%3Citem%20id=%22playbutton%22%20x=%2210%22%20y=%2235%22%20/%3E%3Citem%20id=%22stopbutton%22%20x=%2260%22%20y=%2235%22%20/%3E%3Citem%20id=%22volumecontrol%22%20x=%22180%22%20y=%2238%22%20/%3E%3C/layout%3E%3Cstyles%3E%3CBackground%20backgroundColor=%22#CECED5%22%20useBevel=%22true%22%20bevelAlpha=%2270%22%20transparent=%22%22%20/%3E%3CButton%20themeColor=%22#46FF00%22%20useCustom=%22false%22%20customPlayPauseURL=%22%22%20customStopURL=%22%22%20/%3E%3CControlIcons%20backgroundColor=%22#6F7777%22%20/%3E%3CLoadBar%20backgroundColor=%22#FFFFFF%22%20borderColor=%22#C4CCCC%22%20fillColor=%22#5EBB4D%22%20/%3E%3CPlayBar%20backgroundColor=%22#F7F7F7%22%20outerBorderColor=%22#919999%22%20innerBorderColor=%22#C4CCCC%22%20fillColor=%22#7BFF4C%22%20fontSize=%2210%22%20color=%22#000000%22%20streamingText=%22%22%20pausedText=%22%22%20width=%22380%22%20/%3E%3CSliderThumbs%20backgroundColorOff=%22#6F7777%22%20backgroundColorOn=%22#46FF00%22%20/%3E%3CUIBorder%20borderColor=%22#666666%22%20borderWidth=%221%22%20/%3E%3CVolumeControl%20themeColorOff=%22#6F7777%22%20themeColorOn=%22#46FF00%22%20/%3E%3C/styles%3E%3C/mp3player%3E' },
				{ allowfullscreen: "false", quality: "high", wmode: "window", bgcolor: "#CECED5" },
				{ id: placeholderId + '_swf', name: placeholderId + '_swf' }
			);
		}
	});
};

function EmbedYouTubeVideo(placeholderId, videoCode, width, height, isAutoStart) {
	swfobject.embedSWF("http://www.youtube.com/v/" + videoCode + "?fs=1&hl=el_GR&rel=0&autoplay=" + (isAutoStart == true ? '1' : '0'), placeholderId, width, height, '10.0.0', null, null);
};

function GetFromQueryString(name) {
	name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
	var regexS = "[\\?&]" + name + "=([^&#]*)";
	var regex = new RegExp(regexS);
	var results = regex.exec(window.location.href);
	if (results == null)
		return "";
	else
		return results[1];
};

// Returns the vidAds zone based on the given category
function GetVidAdsZone(/*int*/pageId, /*int*/categoryId) {
	try {
		// first, check for page-specific ads
		switch (parseInt(pageId)) {
			case 109:
				return 'http://www.vidads.gr/get/video/nms/265'; // ΕΞΟΔΟΣ
			default:
				break;
		}

		// next, check for category-specific ads
		switch (parseInt(categoryId)) {
			case 12: case 98:
				return 'http://www.vidads.gr/get/video/nms/108'; // AUTO-MOTO 
			case 54:
				return 'http://www.vidads.gr/get/video/nms/159'; // BEST OF 
			case 78:
				return 'http://www.vidads.gr/get/video/nms/135'; // GAMES
			case 84: case 99: case 88: case 83: case 97:
				return 'http://www.vidads.gr/get/video/nms/160'; // X-SPORTS
			case 17:
				return 'http://www.vidads.gr/get/video/nms/161'; // ΠΕΡΙΒΑΛΛΟΝ
			case 11: case 116: case 92:
				return 'http://www.vidads.gr/get/video/nms/163'; // LIFESTYLE
			case 9:
				return 'http://www.vidads.gr/get/video/nms/164'; // MEDIA
			case 8: case 66: case 63: case 68: case 64: case 67:
				return 'http://www.vidads.gr/get/video/nms/165'; // OIKONOMIA
			case 10: case 109: case 110: case 71: case 108: case 114: case 119: case 121:
				return 'http://www.vidads.gr/get/video/nms/109'; // SPORTS
			case 80: case 32: case 22: case 26: case 48: case 28: case 14:
				return 'http://www.vidads.gr/get/video/nms/166'; // ΓΥΝΑΙΚΑ
			case 131:
				return 'http://www.vidads.gr/get/video/nms/167'; // ΣΥΝΤΑΓΕΣ
			case 53: case 5: case 4: case 6: case 40: case 55: case 125: case 111: case 94: case 56: case 16: case 7: case 128:
				return 'http://www.vidads.gr/get/video/nms/168'; // ΕΠΙΚΑΙΡΟΤΗΤΑ
			case 130:
				return 'http://www.vidads.gr/get/video/nms/169'; // ΠΟΝΤΙΑΚΟ ΔΕΛΤΙΟ
			case 13:
				return 'http://www.vidads.gr/get/video/nms/170'; // ΠΟΛΙΤΙΣΜΟΣ
			case 25:
				return 'http://www.vidads.gr/get/video/nms/171'; // ΣΤΟΝ ΚΟΣΜΟ ΤΟΥΣ
			case 36:
				return 'http://www.vidads.gr/get/video/nms/172'; // ΤΕΧΝΟΛΟΓΙΑ
			case 15: case 103: case 105: case 104: case 89: case 106: case 85:
				return 'http://www.vidads.gr/get/video/nms/173'; // ΥΓΕΙΑ
			case 123: case 120: case 112: case 96: case 107: case 90: case 95: case 102: case 87: case 50: case 47: case 81: case 19: case 46: case 49: case 76: case 117: case 77: case 129:
				return 'http://www.vidads.gr/get/video/nms/174'; // ΤΑΞΙΔΙΑ
			case 58:
				return 'http://www.vidads.gr/get/video/nms/154'; // AUDIO
			case 185:
				return 'http://www.vidads.gr/get/video/nms/280'; // ΘΑΛΑΣΣΑ
			case 178:
				return 'http://www.vidads.gr/get/video/nms/302'; // ΕΞΟΔΟΣ/COCKTAIL
			case 113:
				return 'http://www.vidads.gr/get/video/nms/271'; // WebTV (Αρθρο)
			default:
				return 'http://www.vidads.gr/get/video/nms/100'; // Pοζ Ζώνη
		}
	} catch (ex) {
		return 'http://www.vidads.gr/get/video/nms/100';
	}
};

function SetUniqueRadioButton(nameregex, current) {
	re = new RegExp(nameregex);

	for (i = 0; i < document.forms[0].elements.length; i++) {
		elm = document.forms[0].elements[i];

		if (elm.type == 'radio') {
			if (re.test(elm.name)) {
				elm.checked = false;
			}
		}
	}

	current.checked = true;
};

/**
* Create a cookie with the given name and value and other optional parameters.
*
* @example $.cookie('the_cookie', 'the_value');
* @desc Set the value of a cookie.
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
* @desc Create a cookie with all available options.
* @example $.cookie('the_cookie', 'the_value');
* @desc Create a session cookie.
* @example $.cookie('the_cookie', null);
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
*       used when the cookie was set.
*
* @param String name The name of the cookie.
* @param String value The value of the cookie.
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
*                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
*                             If set to null or omitted, the cookie will be a session cookie and will not be retained
*                             when the the browser exits.
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
*                        require a secure protocol (like HTTPS).
* @type undefined
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/

/**
* Get the value of a cookie with the given name.
*
* @example $.cookie('the_cookie');
* @desc Get the value of a cookie.
*
* @param String name The name of the cookie.
* @return The value of the cookie.
* @type String
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
jQuery.cookie = function (name, value, options) {
	if (typeof value != 'undefined') { // name and value given, set cookie
		options = options || {};
		if (value === null) {
			value = '';
			options.expires = -1;
		}
		var expires = '';
		if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
			var date;
			if (typeof options.expires == 'number') {
				date = new Date();
				date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
			} else {
				date = options.expires;
			}
			expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
		}
		// CAUTION: Needed to parenthesize options.path and options.domain
		// in the following expressions, otherwise they evaluate to undefined
		// in the packed version for some reason...
		var path = options.path ? '; path=' + (options.path) : '';
		var domain = options.domain ? '; domain=' + (options.domain) : '';
		var secure = options.secure ? '; secure' : '';
		document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
	} else { // only name given, get cookie
		var cookieValue = null;
		if (document.cookie && document.cookie != '') {
			var cookies = document.cookie.split(';');
			for (var i = 0; i < cookies.length; i++) {
				var cookie = jQuery.trim(cookies[i]);
				// Does this cookie string begin with the name we want?
				if (cookie.substring(0, name.length + 1) == (name + '=')) {
					cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
					break;
				}
			}
		}
		return cookieValue;
	}
};


// jQuery marquee
jQuery.fn.marquee = function (settings) {
	settings = jQuery.extend({
		speed: 1
	}, settings);

	return this.each(function () {
		var $strip = jQuery(this);
		$strip.addClass("newsticker")
		var stripWidth = 0;
		var $mask = $strip.wrap("<div class='mask'></div>");
		var $tickercontainer = $strip.parent().wrap("<div class='tickercontainer'></div>");
		var containerWidth = $strip.parent().parent().width();
		$strip.find("li").each(function (i) {
			stripWidth += jQuery(this, i).outerWidth(true);
		});
		$strip.width(stripWidth);
		var totalTravel = stripWidth + containerWidth;
		var left = parseFloat($strip.css("left"));
		var isPaused = false;

		$strip.hover(function () { isPaused = true }, function () { isPaused = false });

		setInterval(function () {
			if (!isPaused) {
				left = (left + totalTravel < 0) ? containerWidth : left - settings.speed;
				$strip.css("left", left);
			}
		}, 50);
	});
};

/*
function ShowCustomGoogleAds(google_ads) {
	var s = '';
	var i;

	alert(1);
	return;

	if (google_ads.length == 0) return;

	// if an image, flash or html ad is returned, display that ad. Otherwise, build a string containing all of the ads and
	// then use a document.write() command to print that string.
	if (google_ads[0].type == "flash")
	{
		s += '<a href=\"' +
		google_info.feedback_url + '\" style="color:000000">Ads by Google</a><br>' +
		'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' +
		' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="' +
		google_ad.image_width + '" HEIGHT="' +
		google_ad.image_height + '"> <PARAM NAME="movie" VALUE="' +
		google_ad.image_url + '">' +
		'<PARAM NAME="quality" VALUE="high">' +
		'<PARAM NAME="AllowScriptAccess" VALUE="never">' +
		'<EMBED src="' +
		google_ad.image_url + '" WIDTH="' +
		google_ad.image_width + '" HEIGHT="' +
		google_ad.image_height +
		'" TYPE="application/x-shockwave-flash"' +
		' AllowScriptAccess="never" ' +
		' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>';
	}
	else if (google_ads[0].type == "image")
	{
		s += '<a href=\"' + google_info.feedback_url + '\" style="color:000000">Ads by Google</a><br><a href="' +
		google_ads[0].url + '" target="_top" title="go to ' +
		google_ads[0].visible_url + '" onmouseout="window.status=\'\'"onmouseover="window.status=\'go to ' +
		google_ads[0].visible_url + '\';return true"><img border="0" src="' +
		google_ads[0].image_url + '"width="' +
		google_ads[0].image_width + '"height="' +
		google_ads[0].image_height + '"></a>';
	}
	else if (google_ads[0].type == "html") 
	{
		s += '<a href=\"' + google_info.feedback_url + '\" style="color:000000">Ads by Google</a><br>' + google_ads[0].snippet;
	}
	else
	{
		if (google_ads.length == 1)
		{
			// Partners should adjust text sizes so ads occupy the majority of ad space.
			s += '<a href=\"' +
			google_info.feedback_url + '\" style="color:000000">Ads by Google</a><br> <a style="text-decoration:none" href="' +
			google_ads[0].url + '" onmouseout="window.status=\'\'"onmouseover="window.status=\'go to ' +
			google_ads[0].visible_url + '\';return true"> <span style="textdecoration:underline;font-size:20pt"> <b>' +
			google_ads[0].line1 + '</b><br></span></a> <span style="color:#000000;font-size:16pt">' +
			google_ads[0].line2 + '&nbsp;' +
			google_ads[0].line3 + '<br></span> <a style="color:#008000; font-size:14pt;text-decoration:none" href="' +
			google_ads[0].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' +
			google_ads[0].visible_url + '\';return true"><span>' +
			google_ads[0].visible_url + '</span></a><br>';
		}
		else if (google_ads.length > 1)
		{
			s += '<a href=\"' + google_info.feedback_url + '\" style="color:000000">Ads by Google</a><br>'
			
			// For text ads, append each ad to the string.
			for (i = 0; i < google_ads.length; ++i) {
				s += '<br><a style="text-decoration:none" href="' +
				google_ads[i].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' +
				google_ads[i].visible_url + '\';return true"> <span style="textdecoration: underline"> <b>' +
				google_ads[i].line1 + '</b><br></span></a> <span style="color:#000000">' +
				google_ads[i].line2 + '<br>' +
				google_ads[i].line3 + '<br></span> <a style="color:#008000; text-decoration:none" href="' +
				google_ads[i].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' +
				google_ads[i].visible_url + '\';return true"><span>' +
				google_ads[i].visible_url + '</span></a><br>';
			}
		}
	}

	if (google_ads[0].bidtype == "CPC")	// insert this snippet for each ad call
	{ 
		google_adnum = google_adnum + google_ads.length;
	}

	document.write(s);

	return;
}
*/

