function fixedPositionForIE6(type,length){ //type:fixedSide or fixedBottom,  length:fixedSide=topCss or  fixedBottom:objHeight 
	var viewportScroll = (document.documentElement) ? document.documentElement.scrollTop : document.body.scrollTop;	
	var viewportHeight = (document.documentElement) ? document.documentElement.clientHeight : document.body.clientHeight;

	if(type == "fixedSide"){		
		var objTop = length;
		return objTop + viewportScroll + "px";
	} else if( type == "fixedBottom"){				
		var objHeight = length;
		var objTop = viewportHeight - objHeight;		
		return objTop + viewportScroll + "px"
	}
}
function goTop(){	
	window.scrollTo(0,0);	
}



function flashWrite(url,w,h,vars,bg,win){
	
	var id=url.split("/")[url.split("/").length-1].split(".")[0]; 
	if(vars==null) vars='';
	if(bg==null) bg='#FFFFFF';
	if(win==null) win='transparent';

	var flashStr= "	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
		flashStr+="			codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
		flashStr+="			width='"+w+"'";
		flashStr+="			height='"+h+"'";
		flashStr+="			id='"+id+"'";
		flashStr+="			align='middle'>";

		flashStr+="		<param name='allowScriptAccess' value='always' />";
		flashStr+="		<param name='movie' value='"+url+"' />";
		flashStr+="		<param name='FlashVars' value='"+vars+"' />";
		flashStr+="		<param name='wmode' value='"+win+"' />";
		flashStr+="		<param name='menu' value='false' />";
		flashStr+="		<param name='quality' value='high' />";
		flashStr+="		<param name='bgcolor' value='"+bg+"' />";
		
		flashStr+="		<embed src='"+url+"'";
		flashStr+="		       flashVars='"+vars+"'";
		flashStr+="		       wmode='"+win+"'";
		flashStr+="		       menu='false'";
		flashStr+="		       quality='high'";
		flashStr+="		       bgcolor='"+bg+"'";
		flashStr+="		       width='"+w+"'";
		flashStr+="		       height='"+h+"'";
		flashStr+="		       name='"+id+"'";
		flashStr+="		       align='middle'";
		flashStr+="		       allowScriptAccess='always'";
		flashStr+="		       type='application/x-shockwave-flash'";
		flashStr+="		       pluginspage='http://www.macromedia.com/go/getflashplayer' />";
		flashStr+=" </object>";

	document.write(flashStr);
}


