function FlashEmbed(fid,wd,ht,fn,para)
{
 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="' + wd + '" height="' + ht + '" id="' + fid + '" align="middle">');
 document.write('<param name="allowScriptAccess" value="sameDomain">');
 document.write('<param name="movie" value="' + fn + para + '">');
 document.write('<param name="quality" value="high">');
 document.write('<param name="wmode" value="transparent">');
 document.write('<embed src="' + fn + para + '" menu="false" quality="high" wmode="transparent" width="' + wd + '" height="' + ht + '" name="' + fid + '" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
 document.write('</object>');
}


function login(){
		var url = "http://www.isky.co.kr/login.sky?p_url=http://www.androians.com/vegax/default.htm";
		top.location.href = url;
	}

function logout(){
		top.location.href = "http://member.isky.co.kr/logoutEvent.sky?p_url=http://www.androians.com/vegax/default.htm";
	}
	
function FNfullScreen_izar(){ 
 var thisURL="http://event.isky.co.kr/EF10S/izar/html/izar.html";
 window.open(thisURL,'_blank','fullscreen=yes, type=fullWindow, scrollbars=yes');
 } 
function FNfullScreen_sirius() {
  var thisURL="http://event.isky.co.kr/EF10S/androianPop.php";
  window.open(thisURL,'_blank','fullscreen=yes, type=fullWindow, scrollbars=yes');
}    
function FNfullScreen_vega() {
	var thisURL="http://event.isky.co.kr/EF10S/vega/html/vega.html";
	window.open(thisURL,'_blank','fullscreen=yes, type=fullWindow, scrollbars=yes');
}
function FNfullScreen_miarch() {
  var thisURL="http://event.isky.co.kr/EF10S/mirach/default.htm";
	
	var scltype = "yes";
	var y = screen.availHeight;
	var x = screen.availWidth;
	var inWidth = 1274;
	var inHeight = 858;
	var xtop = Number((y - inHeight)/2);
	var xleft = Number((x - inWidth)/2);
	window.open(thisURL,"mirach","width="+inWidth+",height="+inHeight+",top="+xtop+",left="+xleft+",scrollbars="+ scltype +",toolbar=no,menubar=no,status=no,location=no,resizable=no");

  //window.open(thisURL);
}
function FNfullScreen_vegax() {
  var thisURL="http://www.androians.com/vegax/default.htm";
	var scltype = "yes";
	var y = screen.availHeight;
	var x = screen.availWidth;
	var inWidth = 1240;
	var inHeight = 750;
	var xtop = Number((y - inHeight)/2);
	var xleft = Number((x - inWidth)/2);
	//window.open(thisURL,"vegax","width="+inWidth+",height="+inHeight+",top="+xtop+",left="+xleft+",scrollbars="+ scltype +",toolbar=no,menubar=no,status=no,location=no,resizable=no");
  window.open(thisURL,'vegax','fullscreen=yes, type=fullWindow, scrollbars=yes');
}
 
function FNiSky()
{
  var thisURL="http://www.isky.co.kr/";
  window.open(thisURL,'','scrollbars=auto');	
}

function preview(ty) {
  var thisURL="./news/news_pview.php?type="+ty;
  window.open(thisURL,'','width=1013px,height=690px,scrollbars=yes');
}
function sendSNS(site, resultkey) {
	var thisURL = "";
	
	switch (site) {
		case  'facebook':
			
			window.open(thisURL+resultkey+"&site="+site);
			break;
		case  'twitter':
			thisURL= "http://twitter.com/home?status=";
			window.open(thisURL+resultkey+"&site="+site);
			break;
		case  'me2day':
			thisURL= "http://me2day.net/posts/new?new_post[body]=" ; //&new_post[tags]
			window.open(thisURL+'"'+resultkey+'":'+resultkey+"&site="+site);
			break;

	}
	CountLoadLink(resultkey,site);	
}

function CountLoadLink(str,site)
{

	
	var url = str.replace("./news/news_read.php?idx=","./news/news_rcv.php?site="+site+"&idx=");

    var oHttp = null;

    if (window.XMLHttpRequest)
    {
        oHttp = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        oHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    
	oHttp.open("POST", url, false);
	oHttp.send();

}

function VegaXLinkSNS(site,str) {
	var thisURL = "";
	var eventMsg="";
	var ran = Math.random()*10000000000000000+Math.random()*10000000000000000;
	var eventURL = "http://www.androians.com/vegax/menu.php?menu="+str+(ran);
	/*
	if(str == "1")
		eventMsg="VEGAX PC불만백서 보기";
	else
		eventMsg="VEGAX Teaser 영상 보기";
		*/
	eventMsg="PC를 초월한 최강 스마트폰 VegaX가 온다!!";
	switch (site) {
		case  'facebook':
			
			thisURL="http://www.facebook.com/sharer.php?u=" + encodeURIComponent(eventURL)+ "&t=" + encodeURIComponent(eventMsg) ;
			window.open(thisURL);
			break;
		case  'twitter':
			thisURL= "http://twitter.com/share?text=" + encodeURIComponent(eventMsg) + "&url="+ encodeURIComponent(eventURL);
			window.open(thisURL);
			break;
		case  'me2day':
			thisURL= "http://me2day.net/posts/new?new_post[body]=" ; //&new_post[tags]
			window.open(thisURL+'"'+encodeURIComponent(eventMsg )+'":'+encodeURIComponent(eventURL) + ' ' + encodeURIComponent(eventURL));
			break;

	}
	//CountLoadLink2(str,site);	
}

function VegaXLinkSNS2(site,msg,img) {
	var thisURL = "";
	
	//var ran = Math.random()*10000000000000000+Math.random()*10000000000000000;
	var eventURL = "http://www.androians.com/vegax/vegaXpress_main.php?img="+img;
	/*
	if(str == "1")
		eventMsg="VEGAX PC불만백서 보기";
	else
		eventMsg="VEGAX Teaser 영상 보기";
		*/
	//eventMsg="PC를 초월한 최강 스마트폰 VegaX가 온다!!";
	switch (site) {
		case  'facebook':
			
			thisURL="http://www.facebook.com/sharer.php?u=" + encodeURIComponent(eventURL)+ "&t=" + encodeURIComponent(msg) ;
			window.open(thisURL);
			break;
		case  'twitter':
			thisURL= "http://twitter.com/share?text=" + encodeURIComponent(msg) + "&url="+ encodeURIComponent(eventURL);
			window.open(thisURL);
			break;
		case  'me2day':
			thisURL= "http://me2day.net/posts/new?new_post[body]=" ; //&new_post[tags]
			window.open(thisURL+'"'+encodeURIComponent(msg)+'":'+encodeURIComponent(eventURL) + ' ' + encodeURIComponent(eventURL));
			break;

	}
	//CountLoadLink2(str,site);	
}

function CountLoadLink2(str,site)
{

	
	var url = "./m/miracle_rcv.php?idx=" + str + "&site="+site;

    var oHttp = null;

    if (window.XMLHttpRequest)
    {
        oHttp = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        oHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    
	oHttp.open("POST", url, false);
	oHttp.send();

}
function mainFlashEmbed(fid,fn,wd,ht,para)
{
 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="' + wd + '" height="' + ht + '" id="' + fid + '" align="middle">');
 document.write('<param name="allowScriptAccess" value="sameDomain">');
 document.write('<param name="movie" value="' + fn + para + '">');
 document.write('<param name="quality" value="high">');
 document.write('<param name="wmode" value="opaque">');
 document.write('<param name="scale" value="noscale" />');
 document.write('<param name="salign" value="lt" />');
 document.write('<embed src="' + fn + para + '" menu="false" quality="high" wmode="opaque" width="' + wd + '" height="' + ht + '" name="' + fid + '" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
 document.write('</object>');
}



