document.writeln('<a href="#" style="cursor:pointer;" onclick="GG.show(\'GG_58723627fcebc230ab0d53ddf5f16e34\'); return false;" ><img border="0" src="http://www.guaranteeguarantee.com/company/58723627fcebc230ab0d53ddf5f16e34?image"/></a><style>.GG_58723627fcebc230ab0d53ddf5f16e34p{color:#555555;font-family:Verdana, Arial;font-size:16px;font-weight:normal; line-height:20px;margin:5px;padding:0px;font-size:16px;}.GG_58723627fcebc230ab0d53ddf5f16e34box{color:#555555;font-family:Verdana, Arial;font-size::16px;font-weight:normal; line-height:16px;background-color: #C9D7E0;width: 150px;margin: 10px;padding: 24px;text-align:center;font-size:14px;white-space:nowrap;}.GG_58723627fcebc230ab0d53ddf5f16e34box a{padding: 0px;  margin:0px;}</style><div style="display:none"><div id="GG_58723627fcebc230ab0d53ddf5f16e34" style="font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif"  ><div style="text-align:center; overflow:hidden; padding:10px; margin:30px 0px 0px 0px"><p class="GG_58723627fcebc230ab0d53ddf5f16e34p">\'Trial Company\' is </p><p class="GG_58723627fcebc230ab0d53ddf5f16e34p">GuaranteeGuarantee Certified</p><p class="GG_58723627fcebc230ab0d53ddf5f16e34p">Certified Since: 09/08/2010</p></div><p class="GG_58723627fcebc230ab0d53ddf5f16e34p" style="padding: 10px; background-color: #efefef; color:#777; font-weight:bold; text-align:center; width:300px; margin:0px auto">Links not functional in trial mode</p><br><table align="center" style="margin:0px auto;" cellpadding="0" cellspacing="0" border="0"><tr><td align="center"><div class="GG_58723627fcebc230ab0d53ddf5f16e34box"><a href="#"  >Report Violation of <br> Stated Guarantee</a></div></td><td align="center"><div class="GG_58723627fcebc230ab0d53ddf5f16e34box"><a href="#"  >Learn More About <br> GuaranteeGurantee</a></div></td></tr></table><br style="clear:both"></div></div>');
var GGURL = 'http://www.guaranteeguarantee.com/';

var GG = {
	url: '',
	shown: false, 
	seal: null, 
	container: null,
	config: {
		width: 500, 
		height: 390, 
		styles:{
			'border': '4px solid #265e86',
			'backgroundColor': '#FFFFFF',
			'padding': '0px',
			'overflow': 'hidden',
			'margin': '0px',
			'backgroundImage': 'url('+GGURL+'images/logo-GG-bg.gif)',
			'backgroundRepeat': 'repeat-x',
			'backgroundPosition': 'top'
		}
	},
	Browser: {
	 Engine: {name: 'unknown'}
	},
	
	setStyle: function(el, styles){
		for (var style in styles) el.style[style] = styles[style];
	},
	getCenterPosition: function(){
		var width = GG.config.width;
		var height = GG.config.height;
		var win = window;
		var doc = (!document.compatMode || document.compatMode == 'CSS1Compat') ? document.getElementsByTagName('html')[0]: document.body;
	
		if (GG.Browser.Engine.presto || GG.Browser.Engine.webkit) 
			var size = {x: win.innerWidth, y: win.innerHeight};
		else
			var size = {x: doc.clientWidth, y: doc.clientHeight};

		var scrollSize = {x: Math.max(doc.scrollWidth, size.x), y: Math.max(doc.scrollHeight, size.y), center: Math.round(Math.max(doc.scrollWidth, size.x) / 2) };
		
		var scroll = {x: win.pageXOffset || doc.scrollLeft, y: win.pageYOffset || doc.scrollTop};
		
		return {
			top: scroll.y+24,
			left: (scrollSize.center - Math.round(width / 2))
		}
	},
	show: function(id){
		if (GG.shown == true) return;
		
		GG.setStyle(GG.seal, {
			'display': 'block'
		});
		GG.shown = true;
		
		if (GG.container.innerHTML == ''){
			//var doc = (!document.compatMode || document.compatMode == 'CSS1Compat') ? document.getElementsByTagName('html')[0] : document.body;
			GG.container.innerHTML = document.getElementById(id).innerHTML;
		}//end if
	},
	hide: function(){
		if (GG.shown == false) return;
		
		GG.setStyle(GG.seal, {
			'display': 'none'
		});
		GG.shown = false;
	},
	init: function(){
		
		GG.Browser = {
			Engine: {name: 'unknown'}
		};

		if (window.opera) 
			GG.Browser.Engine = {name: 'presto'};
		else if (window.ActiveXObject) 
			GG.Browser.Engine = {name: 'trident'};
		else if (!navigator.taintEnabled) 
			GG.Browser.Engine = {name: 'webkit'};
		else if (document.getBoxObjectFor != null) 
			GG.Browser.Engine = {name: 'gecko'};
		GG.Browser.Engine[GG.Browser.Engine.name] = true;

		var a = document.createElement('a');
		var d = document.createElement('div');
		GG.seal = document.createElement('div');
		GG.container = document.createElement('div');
		
		a.innerHTML = '<span style="color:#fff;font-family:Verdana, Arial, Helvetica, sans-seri;font-size:14px;font-weight:bold;">X</span>';
		a.onclick = function(){GG.hide();};
		
		GG.setStyle(d, {'textAlign': 'right', 'margin': '0px', 'backgroundImage': 'url('+GGURL+'images/logo-GG.gif)', 'backgroundRepeat':'no-repeat', 'height':'72px'});
		GG.setStyle(a, {'cursor': 'pointer', 'position': 'relative', 'top': '10px', 'left': '-10px'});
		GG.setStyle(GG.seal, GG.config.styles);
		GG.setStyle(GG.seal, {
			'display': 'none',
			'position': 'absolute',
			'height': GG.config.height+'px',
			'width': GG.config.width+'px'
		});
		GG.setPosition();
		
		d.appendChild(a);
		GG.seal.appendChild(d);
		GG.seal.appendChild(GG.container);
		
		document.body.appendChild(GG.seal);
		
		GG.shown = false;
	},
	setPosition: function(){
		var p = GG.getCenterPosition();
		
		GG.setStyle(GG.seal, {
			'top': p.top+'px',
			'left': p.left+'px'
		});
	}
};

if( window.addEventListener ) {
  window.addEventListener('load',function(){GG.init(); window.addEventListener('scroll',function(){GG.setPosition();},false); },false);
} else if( document.addEventListener ) {
  document.addEventListener('load',function(){GG.init(); document.addEventListener('scroll',function(){GG.setPosition();},false); },false);
} else {
  window.attachEvent('onload', function(){GG.init(); window.attachEvent('onscroll', function(){GG.setPosition(); return false;}); return false;});
}
