/**
 * @author yangmy

 var index_fplogo = new fplogo;
index_fplogo.show();
index_fplogo.move();*/
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}
function $(objName){
 if(document.getElementById){
  return eval('document.getElementById("' + objName + '")');
 }else{
  return eval('document.all.' + objName);
 }
}
function Show_Sub(num){ 
switch(num)
				{
					case 1:
						content_sub.location = "doublechipin.aspx";
						break;
					case 2:
						content_sub.location = "threedchipin.aspx";
						break;
					case 3:
						content_sub.location = "happy8chipin.aspx";
						break;
					case 4:
						content_sub.location = "servenchipin.aspx";
						break;		
				}
}

function Hide_Link(){ 
$("link1").className = '';
}
function Show_Link(){ 
$("link1").className = 'selectlink';
}
function hide(objName){
$(objName).style.display = 'none';
}
function display(objName){
$(objName).style.display = '';
}
function hide_sub(objName){
$(objName).style.display = 'none';
}
function display_sub(objName){
$(objName).style.display = 'block';
$(objName).style.left=(Math.round((window.screen.width-487)/2)).toString()+"px";
$(objName).style.top=(Math.round((window.screen.Height-246)/2)).toString()+"px";
}
function fplogo()
{
	this.move = function MoveFplogo()
	{
		var obj = document.getElementById("box");
		if (this.UpOrDown == "Up")
		{
			obj.style.top=document.documentElement.scrollTop+460;
		}
		else
			obj.style.top=document.body.scrollTop+document.body.offsetHeight-460;
		if (this.Absolute)
		{
			if (this.LeftOrRight == "Right")
			{
				obj.style.left=document.body.scrollLeft+document.body.offsetWidth - 460;
			}
			else
				obj.style.left=document.body.scrollLeft+ 460;
		}
		setTimeout("box.move();",50);
	}
	this.show=function showd()
	{
     $("box").style.display = 'block';
     $("box").style.left=(Math.round((window.screen.width-487)/2)).toString()+"px";
     $("box").style.top=(Math.round((window.screen.Height-246)/2)).toString()+"px";
    }
}

			  
/*隐藏开卡窗口，显示开卡成功窗口*/
function show_ad()
{
	SetIframeSrc('include/step1new.aspx');
	hide("box");
	display_sub("box2");
	reloadmem();
	setTimeout("hide('box2');",5000);
}

function show_adcon()
{
	SetIframeSrc('include/step1new.aspx');
	hide("box");
	reloadmem();
}

function SetIframeSrc( url )
{
	document.getElementById('step_sub').src= url;
}

function show_img(id){
	for(i=1;i<6;i++)
	{
		$("img"+i).src="images/btn_00"+i+".jpg";
	}
		$("img"+id).src="images/btn_00"+id+"b.jpg";
	}