/* --------------------------------------------- */ 
/* 
/*   Max.Chen By Tm Inc
/*   2006-10-11 
/*   
/* --------------------------------------------- */ 

// ??????flash???? ???????flash??sp2??????????????

function aTarget()
{
    var links = document.getElementsByTagName("a");
    for(var i = 0; i < links.length; i++)
    {
        links[i].target = "_blank";
    }
}

function showFlash(iUrl,iWidth,iHeight,iWmode,mm)
{
var imag=new Array();
var link=new Array();
imag[1]="http://img.91huo.com/qahr/images/100406ver/101111flash_530176.jpg";
link[1]="http://qahr.91.com/guide/quests/102ndcp_riceporridge.shtml";
imag[2]="http://img.91huo.com/qahr/images/100406ver/101111flash_530176.jpg";
link[2]="http://qahr.91.com/guide/quests/102ndcp_riceporridge.shtml";
imag[3]="http://img.91huo.com/qahr/images/100406ver/101109flash_530176.jpg";
link[3]="http://qahr.91.com/guide/quests/10cranberries.shtml";
imag[4]="http://img.91huo.com/qahr/images/100406ver/cosplay_530176.jpg";
link[4]="http://contest.qahr.91.com/conceptart/";
imag[5]="http://img.91huo.com/qahr/images/100406ver/101013flash_530176.jpg";
link[5]="http://qahr.91.com/activity/2010expansion/season3/index.shtml";
imag[6]="http://img.91huo.com/qahr/images/100406ver/101115flash_530176.jpg";
link[6]="http://bbs.arab.91.com/showthread.php?t=44630";
//??????????

var flashvars="";
for(var i=1; i<imag.length; i++){
	if( i == imag.length-1 ){
	flashvars=flashvars+(imag[i] + "#" + link[i]);
	}else{
	flashvars=flashvars+(imag[i] + "#" + link[i]+"|");	
		}
}
//alert(imag.length);
flash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+ iWidth +'" height="' + iHeight +'" />';
flash = flash + '<param name="movie" value="'+ iUrl +'" />';
flash = flash + '<param value="always" name="allowScriptAccess"/>';
flash = flash + '<param name="quality" value="high" />';
flash = flash + '<param name="menu" value="false" />';
if (iWmode == 1) {
	flash = flash + '<param name="wmode" value="transparent" />';		
}
flash = flash + '<param name="FlashVars" value="mylinkpic='+flashvars+'" />';
flash = flash + '<embed src="' + iUrl + '" width="'+ iWidth +'" height="'+ iHeight +'" menu="false" quality="high" allowscriptaccess="always"';
if (iWmode == 1) {
	flash = flash + 'wmode="transparent" ';		
}
flash = flash + 'loop="false" ';
flash = flash + ' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" mwode="transparent" flashvars="mylinkpic='+flashvars+'"></embed>';
flash = flash + '</object>';



document.writeln(flash); 
}

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];}
}
