/*---------------------------------------------------------------------------------------------
                                      JAVASCRIPT CODE                                          
  ---------------------------------------------------------------------------------------------
	function name						| description				| use process
  ---------------------------------------------------------------------------------------------
	viewFlash()							| ÇÃ·¡½Ã Ãâ·Â					| ÇÃ·¡½Ã Ãâ·Â
  ---------------------------------------------------------------------------------------------*/



// ÇÃ·¡½Ã Ãâ·Â
function viewFlash(src, width, height)
{
	document.write("<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='"+width+"' height='"+height+"' title=''>")
	document.write("<param name='movie' value='"+src+"' />")
	document.write("<param name='quality' value='high' />")
	document.write("<param name='wmode' value='transparent'>")
	document.write("<embed src='"+src+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'  wmode='transparent'></embed>")
	document.write("</object>")
}


// ÇÃ·¡½Ã Ãâ·Â
function viewFlash_ad(src, width, height)
{
	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' width='" + width + "' height='" + height + "'><param name='movie' value='" + src + "'><param name='play' value='true'><param name='loop' value='true'><param name='quality' value='high'><param name='wmode' value='transparent'><embed width='" + width + "' height='" + height + "' src='" + src + "' play='true' loop='true' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' wmode='transparent'></embed></object>");
}


function Rand_Banner(Banner)
{	

	var cnt = eval(Banner+".length");;
	var newImg = new Image(); 	
	var ran = Math.round(Math.random()*(cnt-1));



	for(i=0; i<cnt; i++){

		if(ran==i){

			src = eval(Banner+"["+i+"][0]");
			width = eval(Banner+"["+i+"][1]");
			height = eval(Banner+"["+i+"][2]");
			gubn = eval(Banner+"["+i+"][3]");


			if(gubn=="IMG"){


				newImg.src = src; 			
				width = newImg.width;
				height = newImg.height;
				document.write('<img src=\"' + src + '\" width=') 
				document.write(width + ' height=' + height + ' '); 
				document.write('border=0><br>'); 


			}else{				

  				viewFlash(src,width,height);

			}


		}		
	}



}

