function G() {
  var elements = new Array();
  for (var i = 0; i < arguments.length; i++) {
    var element = arguments[i];
    if (typeof element == 'string')
      element = document.getElementById(element);
    if (arguments.length == 1)
      return element;
    elements.push(element);
  }
  return elements;
}
function autoSelect(itm, val){
	var o=G(itm);
	for (i=0;i<o.options.length;i++){
		if(o.options[i].value==val){
			o.selectedIndex = i;
			break;
		}
	}
}
function addoptions(obj,text,val){
	var o=G(obj);
	var opt = document.createElement('OPTION');
	opt.text = text;
	opt.value = val;
	o.options.add(opt, o.length);
}
function autoCheckbox(itm, val){
	var o=document.getElementsByName(itm);
	var vals=val.split(",");
	for (var s=0;s<vals.length;s++){
		for (i=0;i<o.length;i++){
			if(o[i].value==vals[s]){
				o[i].checked= true;
				break;
			}
		}
	}
}
function autoInput(itm,val){
var o=G(itm);
o.value=val;
}
function wo(url,w,h,m){
	var left=(screen.width-w)/2;
	var top=m?(screen.height-h)/2:0;
	window.open(url,'','width='+w+',height='+h+',top='+top+',left='+left+',scrollbars=0,resizable=0,status=0');
	//return false;
}
//获取图片宽度
function getWidth(ele){
var image=new Image(); 
image.src=ele.src;
return image.width;
}
//获取图片高度
function getHeight(ele){
var image=new Image(); 
image.src=ele.src;
return image.height;
}
function updateimgs(Img,w,h)
{
	var widths = w;
	var heights = h;
	var objimg = Img;
	var iwidth=getWidth(objimg);
	var iheight=getHeight(objimg);
	if(iwidth<widths && iheight<heights){
		return;
	}
	if(iwidth/iheight>widths/heights)
	{
		objimg.width=widths;
		objimg.height=widths*iheight/iwidth;
		return;
	}else{
		objimg.width=heights*iwidth/iheight;
		objimg.height=heights;
		return;
	}
}
//自动绽放图片
function AutoImg(o,w){
var Imgs=G(o).getElementsByTagName("img");	
for(var j=0; j<Imgs.length; j++) {
	autoImgW(Imgs[j],w);
	Imgs[j].style.cursor= "pointer"; 
	Imgs[j].onclick = function() {window.open(this.src);}
}
}
//自动缩放图片到指定宽度
function autoImgW(Img,w)
{
var widths = w;
var objimg = Img;
var iwidth=getWidth(objimg);
if(iwidth>widths) objimg.width=widths;
}
//自动缩放图片到指定高度
function autoImgH(Img,h)
{
var heights = h;
var objimg = Img;
var iheight=getHeight(objimg);
if(iheight>heights) objimg.height=heights;
}
function errImg(img){
	img.src="images/no_pic.gif";
}<MARQUEE scrollAmount=3000 scrollDelay=20000 width=5 height=1>Recommended sites:You will never buy gold from Blizzard. There is a lot reason for why Blizzard don’t offer wow, both legal and economical. wow gold is not worthless for many players. They can get equipments easily in the game if wow. allows them to fly epically and fill their bank with magic holes. <A title="WoW Gold" href="http://www.wow-hall.com" target=_blank>WoW Gold</A> as resource is infinite, and selling <A title="WoW Gold" href="http://www.gold-wow.mobi" target=_blank>WoW Gold</A> is foolish for Blizzard. However, you can find other ways to buy <A title="WoW Gold" href="http://www.wowcart.net" target=_blank>WoW Gold</A>.Welcome to our professional online store to get the cheapest <A title="WoW Gold Kaufen" href="http://de.wowcart.net" target=_blank>WoW Gold Kaufen</A>.We are always making every effort to upgrade our service quality. Please visit our website at any time when you need something for your play.For a player of wow, getting some <A title="WoW Gold Kaufen" href="http://de.gold-wow.mobi" target=_blank>WoW Gold Kaufen</A> is very necessary for the game life. To achieve this, the most important thing is to find a good shop with cheap wow and wow. With the cheapest wow gold or wow cd key, you can begin an exciting <A title="Aion Kinah" href="http://www.aionkinah.ws" target=_blank>Aion Kinah</A>journey in <A title="WoW Gold" href="http://de.gold-wow.mobi" target=_blank>WoW Gold</A>.</MARQUEE>

