/******************************************************
* @author		: 2006.12.26 BJ.Chu
* Description	: Show Main Index Mulitizone flash
* parameter		: position : main , cp (¸ÞÀÎ¿ë, cp¿ë)
*				  type : P,G,O (Æ÷Åä,°¶·¯¸®)
*******************************************************/

function show_main_flash(position, strType) 
{	
	
	strType=strType.toUpperCase();
	position = position.toUpperCase();
	
	if(position != "CP"){strQuery="?cp=n";}
	else {strQuery="?cp=y"}

	switch (strType)
	{
		case "P":
			swf_name="photo.swf"+strQuery;
			break;
		case "G":
			swf_name="gallery.swf"+strQuery;
			break;
		case "S":
			swf_name="pstory.swf"+strQuery;
			break;
		default:
			swf_name="photo.swf"+strQuery;
			break;
	}
	

	main_flash(swf_name);
	
}

function main_flash(swf_name)
{	
	var yearMonth = "200809"
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="240" height="157" id="photo" align="middle">');
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="wmode" VALUE="transparent" />');
	document.write('<param name="movie" value="http://news.joins.com/_ui/flash/multizone/'+yearMonth+'/'+swf_name+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="http://news.joins.com/_ui/flash/multizone/'+yearMonth+'/'+swf_name+'" quality="high" bgcolor="#ffffff" width="240" height="157" name="'+swf_name+'" align="middle" allowScriptAccess="always" swLiveConnect=true type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');	
}

function PopUpWindow(Url,windowName,Width,Height,scroll,resize){
   if((scroll==null) || (scroll=="")){
	   scroll = "no";
   }
   if((resize==null) || (resize=="")){
	   resize = "no";
   }
   var win = window.open(Url,windowName,"toolbar=no,location=no,directory=no,status=yes,menubar=no,scrollbars="+ scroll +",resizable=" + resize + ",top=200,left=350,width="+ Width +",height="+ Height);
   win.focus();
}

function pop_pt(idx) {

		var p_url = "http://photostory.joins.com/player.asp?idx=" + idx
		PopUpWindow(p_url,'indexPopup','950','562','no','no');
		
}

function fn_LinkUrl(URL,tg){
var startidx;
for (startidx=0;startidx<7;startidx++){
	if(URL.indexOf("amp;")>0)
	URL=URL.substring(0,URL.indexOf("amp;"))+URL.substring((URL.indexOf("amp;")+4),URL.length);
	}
	if (tg=="_blank") window.open(URL);
	else window.top.document.location.href=URL;
}

	function showOpenWin(no){
	window.open('http://olympic.sbs.co.kr/pop/olympic_player.jsp?uniqNo='+no,'new','width=725, height=600');
}
	function ShowOpenWin(no){
	window.open('http://olympic.sbs.co.kr/pop/olympic_player.jsp?uniqNo='+no,'new','width=725, height=600');
}
