// TOP BUTTONS

ROaboutOff = new Image();
ROaboutOff.src = "http://blog.casagrande.la/frederic/img/button_about_off.jpg";
ROaboutOn = new Image();
ROaboutOn.src = "http://blog.casagrande.la/frederic/img/button_about_on.jpg";

RObackOff = new Image();
RObackOff.src = "http://blog.casagrande.la/frederic/img/button_back_off.jpg";
RObackOn = new Image();
RObackOn.src = "http://blog.casagrande.la/frederic/img/button_back_on.jpg";

// OTHER BUTTONS

ROhonorOff = new Image();
ROhonorOff.src = "http://blog.casagrande.la/frederic/img/button_honor_off.gif";
ROhonorOn = new Image();
ROhonorOn.src = "http://blog.casagrande.la/frederic/img/button_honor_on.gif";

ROxmlOff = new Image();
ROxmlOff.src = "http://blog.casagrande.la/frederic/img/button_xml_off.gif";
ROxmlOn = new Image();
ROxmlOn.src = "http://blog.casagrande.la/frederic/img/button_xml_on.gif";

ROtypepadOff = new Image();
ROtypepadOff.src = "http://blog.casagrande.la/frederic/img/button_typepad_off.gif";
ROtypepadOn = new Image();
ROtypepadOn.src = "http://blog.casagrande.la/frederic/img/button_typepad_on.gif";

ROxhtmlOff = new Image();
ROxhtmlOff.src = "http://blog.casagrande.la/frederic/img/button_xhtml_off.gif";
ROxhtmlOn = new Image();
ROxhtmlOn.src = "http://blog.casagrande.la/frederic/img/button_xhtml_on.gif";

ROcssOff = new Image();
ROcssOff.src = "http://blog.casagrande.la/frederic/img/button_css_off.gif";
ROcssOn = new Image();
ROcssOn.src = "http://blog.casagrande.la/frederic/img/button_css_on.gif";

ROccOff = new Image();
ROccOff.src = "http://blog.casagrande.la/frederic/img/button_cc_off.gif";
ROccOn = new Image();
ROccOn.src = "http://blog.casagrande.la/frederic/img/button_cc_on.gif";

ROiecsOff = new Image();
ROiecsOff.src = "http://blog.casagrande.la/frederic/img/button_iecs_off.gif";
ROiecsOn = new Image();
ROiecsOn.src = "http://blog.casagrande.la/frederic/img/button_iecs_on.gif";

ROlinkedinOff = new Image();
ROlinkedinOff.src = "http://blog.casagrande.la/frederic/img/button_linkedin_off.gif";
ROlinkedinOn = new Image();
ROlinkedinOn.src = "http://blog.casagrande.la/frederic/img/button_linkedin_on.gif";

ROopenbcOff = new Image();
ROopenbcOff.src = "http://blog.casagrande.la/frederic/img/button_openbc_off.gif";
ROopenbcOn = new Image();
ROopenbcOn.src = "http://blog.casagrande.la/frederic/img/button_openbc_on.gif";

ROviadeoOff = new Image();
ROviadeoOff.src = "http://blog.casagrande.la/frederic/img/button_viadeo_off.gif";
ROviadeoOn = new Image();
ROviadeoOn.src = "http://blog.casagrande.la/frederic/img/button_viadeo_on.gif";

ROhwgOff = new Image();
ROhwgOff.src = "http://blog.casagrande.la/frederic/img/button_hwg_off.jpg";
ROhwgOn = new Image();
ROhwgOn.src = "http://blog.casagrande.la/frederic/img/button_hwg_on.jpg";

ROfrOff = new Image();
ROfrOff.src = "http://blog.casagrande.la/frederic/img/flag_fr_off.gif";
ROfrOn = new Image();
ROfrOn.src = "http://blog.casagrande.la/frederic/img/flag_fr_on.gif";

ROgbOff = new Image();
ROgbOff.src = "http://blog.casagrande.la/frederic/img/flag_gb_off.gif";
ROgbOn = new Image();
ROgbOn.src = "http://blog.casagrande.la/frederic/img/flag_gb_on.gif";

ROdeOff = new Image();
ROdeOff.src = "http://blog.casagrande.la/frederic/img/flag_de_off.gif";
ROdeOn = new Image();
ROdeOn.src = "http://blog.casagrande.la/frederic/img/flag_de_on.gif";

function Active(NomImage) {
	document[NomImage].src = eval(NomImage + "On.src");
}

function Inactive(NomImage) {
	document[NomImage].src = eval(NomImage + "Off.src");
}

function popitup(source,title,x,y) {
	window.open('http://www.casagrande.la/photo.php?id='+source+'&title='+title,'','width='+x+',height='+y+',scrollbars=0,resizable=0,menubar=0,toolbar=0,location=0,directories=0,status=0,copyhistory=0');
}

function vrml(source,x,y) {
	window.open(source,'','width='+x+',height='+y+',scrollbars=0,resizable=0,menubar=0,toolbar=0,location=0,directories=0,status=0,copyhistory=0');
}

function view_profile(num) {
	window.open('http://www.magelo.com/eq_view_profile.html?num='+num,'','width=800,height=600,scrollbars=0,resizable=0,menubar=0,toolbar=0,location=0,directories=0,status=0,copyhistory=0');
}

function setActiveStyleSheet(title) {
	var i, a, main;
	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
		if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
			a.disabled = true;
			if(a.getAttribute("title") == title) a.disabled = false;
		}
	}
}

function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if ( ( anchor.getAttribute("href") && anchor.getAttribute("rel") == "external" ) || ( anchor.getAttribute("href") && anchor.getAttribute("rel") == "tag" ) )
		anchor.target = "_blank";
	}
}

window.onload = externalLinks;
