// JavaScript Document
function creatflash(ur,w,h,ur2){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" id="'+ur2+'" name="'+ur2+'" width="'+w+'" height="'+h+'"> ');
document.write('<param name="movie" value="' + ur + '">');
document.write('<param name="quality" value="high"> ');
document.write('<param name="wmode" value="transparent"> ');
document.write('<param name="menu" value="false"> ');
document.write('<param name="swLiveConnect=" value="true" /> ');
document.write('<param name="allowScriptAccess" value="sameDomain" /> ');
document.write('<param name="allowFullScreen" value="false" /> ');
document.write('<param name="scale" value="exactfit" /> ');
document.write('<param name="salign" value="t" /> ');
document.write('<embed src="' + ur + '" swLiveConnect="true" salign="t" align="top" wmode="transparent" menu="false" quality="high" scale="exactfit" allowScriptAccess="sameDomain" allowFullScreen="false" pluginspage="http://www.macromedia.com/go/getflashplayer" id="'+ur2+'" name="'+ur2+'" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed> ');
document.write('</object> ');
}
function ImgAutoGlobal(i,w,h){
	var MaxW=w;
	var MaxH=h;
	var o=new Image();o.src=i.src;var w=o.width;var h=o.height;var t;if (w>MaxW){t=MaxW;}else{t=w;}
	if ((h*t/w)>MaxH){i.height=MaxH;i.width=MaxH/h*w;}else{i.width=t;i.height=t/w*h;}
}

var heightAdd=0
var heightMid=0
var openComplete=0
var closeComplete=0
var staticObj = {};
staticObj.timer = "";
staticObj.timer2 = "";
var clicked=0
function openDiv(id,counts){
	if(clicked!=id){
		if(clicked!=0){
			staticObj.timer2=setInterval("midHeight("+clicked+")",10);
		}
		clicked=id
		closeComplete=0
		openComplete=0
		heightMid=heightAdd
		heightAdd=0
		document.getElementById("ser"+id).style.backgroundImage="url('images/icoopen.gif')"
		document.getElementById("ser"+id).style.color="#e8b97c"
		staticObj.timer=setInterval("addHeight("+id+","+counts+")",10);
	}	
}
function addHeight(id,counts){
	heightAdd=heightAdd+1+heightAdd*0.1
	
	if(heightAdd>(counts*20+17)){
		document.getElementById("sub"+id).style.height=(counts*20+17)+ 'px';
		clearInterval(staticObj.timer);
	}else{
		document.getElementById("sub"+id).style.height=heightAdd+ 'px';
	}
}
function midHeight(id){
	document.getElementById("ser"+id).style.backgroundImage="url('images/iconormal.gif')"
	document.getElementById("ser"+id).style.color="#ffffff"
	heightMid=heightMid-1-heightMid*0.05
	if(heightMid<0){
		document.getElementById("sub"+id).style.height=0+ 'px';
		clearInterval(staticObj.timer2);
	}else{
		document.getElementById("sub"+id).style.height=heightMid+ 'px';
	}
}
function onMoveOver(obj){
	obj.style.textDecoration='underline'

}
function onMoveOut(obj){
	obj.style.textDecoration='none'

}


