﻿var arVersion = navigator.appVersion.split("MSIE");
var version = parseFloat(arVersion[1]);
function transPNGPic(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
    var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
    var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
    var imgTitle = (myImage.title) ? 
               "title='" + myImage.title   + "' " : "title='" + myImage.alt + "' "
    var imgStyle = "display:inline-block;" + myImage.style.cssText
    var strNewHTML = "<span " + imgID + imgClass + imgTitle
                   + " style=\"" + "cursor:hand;width:" + myImage.width 
                   + "px; height:" + myImage.height 
                   + "px;" + imgStyle + ";"
                   + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                   + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
     myImage.outerHTML = strNewHTML;
    }
}


//site list
var site = {
	us:0,
	co:1,
	eo:2,
	ct:3,
	zo:4,
	wotf:5,
	tw:6
}

//btm
function publicBottom(siteType,tbWidth,target){
	var bmContext = null;
	target = (target == "_blank" || target == "_self" || target == "_top" || target == "_parent") ? target : "_blank";
	//global value
	var about91 = "<a target=\"" + target + "\" href=\"http://eu.91.com/sp/sp91/about.shtml\">Sobre 91.COM</a>";
	var eu91 = "<a target=\"" + target + "\" href=\"http://eu.91.com/\">EU.91.COM</a>";
	var useragreement="<a target=\"" + target + "\" href=\"read.htm\">Inscription Gratuite</a>";
	var copyright = "Copyright &copy; 2003-2009 <a href=\"http://www.netdragon.us/\">NetDragon Websoft Inc.</a>";
	
	var frco = "<a target=\"" + target + "\" href=\"http://conquete.91.com/\">Conquete 2.0</a>";
	var spzo = "<a target=\"" + target + "\" href=\"http://zoesp.91.com/\">Zero Online</a>";
	var spco = "<a target=\"" + target + "\" href=\"http://conquista.91.com/\">Conquista Online</a>";

    //child site value*/
    var top = "<a href=\"" + window.location.href + "#Top\" target=\"_self\">Top</a>";
	
	var uscontactus = "<a target=\"" + target + "\" href=\"http://eu.91.com/sp/sp91/contacto.shtml\">Contactos</a>";
	var ussignup = "<a target=\"" + target + "\" href=\"http://account.sp.91.com/\">Registro</a>";
	var usproductfaq = "<a target=\"" + target + "\" href=\"http://eu.91.com/sp/sp91/faqs.shtml\">Producto FAQ</a>";
	var ussitemap = "<a target=\"" + target + "\" href=\"http://eu.91.com/sp/sp91/sitemap.shtml\">Mpa Saitio</a>";
		
	var cocontactus = "<a target=\"" + target + "\" href=\"http://co.91.com/systempage/contact.shtml\">Contact Us</a>";
	var cosignup = "<a target=\"" + target + "\" href=\"http://account.91.com/common/signup.aspx?url=http://co.91.com/&flag=co\">Sign Up</a>";
	var coproductfaq = "<a target=\"" + target + "\" href=\"http://co.91.com/guide/faqs.shtml\">Product FAQ</a>";
	var cositemap = "<a target=\"" + target + "\" href=\"http://conquete.91.com/content/2008-04-08/sitemap.shtml\">Carte de Site</a>";
	
	var eocontactus = "<a target=\"" + target + "\" href=\"http://eo.91.com/contact/contact.shtml\">Contact Us</a>";
	var eosignup = "<a target=\"" + target + "\" href=\"http://account.91.com/common/signup.aspx?url=http://eo.91.com/&flag=eo\">Sign Up</a>";
	var eoproductfaq = "<a target=\"" + target + "\" href=\"http://eo.91.com/guide/proficient/faq/faq.shtml\">Product FAQ</a>";
	var eositemap = "<a target=\"" + target + "\" href=\"http://eo.91.com/guide/sitemap.shtml\">Site Map</a>";
	
	var ctcontactus = "<a target=\"" + target + "\" href=\"http://ct.91.com/systempage/contact.shtml\">Contact Us</a>";
	var ctsignup = "<a target=\"" + target + "\" href=\"http://account.91.com/common/signup.aspx?url=http://ct.91.com/&flag=ct\">Sign Up</a>";
	var ctproductfaq = "<a target=\"" + target + "\" href=\"http://ct.91.com/guide/faq.shtml\">Product FAQ</a>";
	var ctsitemap = "<a target=\"" + target + "\" href=\"#\">Site Map</a>";

	var zocontactus = "<a target=\"" + target + "\" href=\"http://zo.91.com/info/contact.shtml\">Contact Us</a>";
	var zosignup = "<a target=\"" + target + "\" href=\"http://account.91.com/common/signup.aspx?url=http://zo.91.com/&flag=zo\">Sign Up</a>";
	var zoproductfaq = "<a target=\"" + target + "\" href=\"http://zo.91.com/info/intro.shtml\">Product FAQ</a>";
	var zositemap = "<a target=\"" + target + "\" href=\"http://zo.91.com/guide/sitemap.shtml\">Site Map</a>";
	
	function getValue(txt){
		var value = "";
		var items = txt.split("<br>");
		var sitem = null;
		var part = null;
		var parttxt = null;
		for(var i = 0; i < items.length; i++){
			sitem = items[i].split(',');
			part = (i == 1) ? "|" : " ";
			parttxt = "";
			for(var k = 0; k < sitem.length; k++)
				parttxt += eval(sitem[k].valueOf()) + part;
			value += parttxt.substring(0,parttxt.length - 1) + "<br />";
		}
		return value;
	}

	document.writeln("<table cellSpacing=\"5\" cellPadding=\"0\" width=\"" + tbWidth + "\" height=\"70\" border=\"0\" class=\"public_bm_table\"><tbody><tr>");
	document.writeln("<td align=\"right\" width=\"50\" class=\"public_bm_td1\"><\/td>");
	document.writeln("<td align=\"center\" class=\"public_bm_td2\" id=\"public_bottom_context\"> <\/td><\/tr><\/tbody><\/table>");
	document.getElementById("public_bottom_context").innerHTML = " ";

//value combination
	bmContext = document.getElementById("public_bottom_context");
	switch(siteType){
		case site.fr: bmContext = getValue("copyright,useragreement<br>eu91,frco,spzo,spco,cositemap"); break;
		case site.co: bmContext = getValue("copyright<br>about91,eu91,cocontactus,cosignup,coproductfaq,useragreement,cositemap"); break;
		case site.eo: bmContext = getValue("copyright<br>about91,eu91,eocontactus,eosignup,eoproductfaq,useragreement,eositemap"); break;
		case site.ct: bmContext = getValue("copyright<br>about91,eu91,ctcontactus,ctsignup,ctproductfaq,useragreement,ctsitemap"); break;
		default:bmContext = getValue("copyright<br>about91,eu91,uscontactus,ussignup,usproductfaq,useragreement,ussitemap"); break;
	}
	document.getElementById("public_bottom_context").innerHTML = bmContext;
}
