function JS_viewObj(objhtml) {
document.write(objhtml);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = 'no';
  resizable_str = 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

var favoriteurl="http://www.brandcar.co.kr/" 
var favoritetitle="Áß°íÂ÷ ¸ÅÀÔ¼¾ÅÍ ºê·£µåÄ«" 
function addfavorites()
{ 
	if (document.all) 
		window.external.AddFavorite(favoriteurl,favoritetitle)
}

function popWin(url,name,w,h,res,scr)
{
	wd = window.open(url,name,"top=50,left=50,width="+w+",height="+h+",resizable="+res+",scrollbars="+scr);
	wd.focus();
}

// ÇØ´ç Å« ÀÌ¹ÌÁö¸¦ »õÃ¢À¸·Î ¶ç¿ì°í ÇÁ¸°Æ® ¸í·É¾î
function ImagePrint(fileName)
{
	var srcimg = new Image();
	srcimg.src = fileName;

	window.open('/common/imgpop.html?filename='+fileName,'imgpopup','width=' + srcimg.width + ',height=' + srcimg.height + ',toolbar=no,menubar=no,scrollbars=no,status=no,resizable=no');
}

function ie(id)
{
	document.write(id.text);
	id.id='';
}

function OptionPopup(num)
{
	var pop = window.open("/sellcar/popOptionView.html?optionNumber=" + num, "popOptionView","width=650,height=600");
	pop.focus();
}

function ECatalogPopup()
{
	var pop = window.open("/sellcar/popEcatalog.html", "popEcatalog","width=650,height=807");
	pop.focus();
}
function ECatalogPopupSel(com, cname, series, realSeries, selectYM, part)
{
	var pop = window.open("/sellcar/popEcatalog.html?company=" + com + "&c_name=" + cname + "&series=" + series + "&realSeries=" + realSeries + "&selectYM=" + selectYM + "&startPage=" + part, "popCatalog","width=650,height=807");
	pop.focus();
}

function popView(str) {
	popWin(str, "portPop", 500, 462, 'no', 'no');
}

function moviePlayViewer(file, width, height) {
	var widthStr = "";
	var heightStr = "";
	if(width != "") {
		widthStr = " width='" + width + "'";
	}
	if(height != "") {
		heightStr = " height='" + height + "'";
	}
document.write("<object classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715' " + widthStr + " " + heightStr + " id='MoviePlayer' type='application/x-oleobject'  name='c_player'>");
document.write("<param name='Filename' value='" + file + "'> ");
//document.write("<param name='AudioStream' value='-1'> ");
//document.write("<param name='AutoSize' value='0'> ");
//document.write("<param name='AutoStart' value='-1'> ");
//document.write("<param name='AnimationAtStart' value='-1'> ");
//document.write("<param name='AllowScan' value='-1'> ");
//document.write("<param name='AllowChangeDisplaySize' value='-1'> ");
//document.write("<param name='AutoRewind' value='0'> ");
//document.write("<param name='Balance' value='0'> ");
//document.write("<param name='BaseURL' value=''> ");
//document.write("<param name='BufferingTime' value='5'> ");
//document.write("<param name='CaptioningID' value=''> ");
//document.write("<param name='ClickToPlay' value='0'> ");
//document.write("<param name='CursorType' value='0'> ");
//document.write("<param name='CurrentPosition' value='-1'> ");
//document.write("<param name='CurrentMarker' value='0'> ");
//document.write("<param name='DefaultFrame' value=''> ");
//document.write("<param name='DisplayBackColor' value='0'> ");
//document.write("<param name='DisplayForeColor' value='16777215'> ");
//document.write("<param name='DisplayMode' value='-1'> ");
//document.write("<param name='DisplaySize' value='0'> ");
//document.write("<param name='Enabled' value='-1'> ");
//document.write("<param name='EnableContextMenu' value='false'> ");
//document.write("<param name='EnablePositionControls' value='-1'> ");
//document.write("<param name='EnableFullScreenControls' value='0'> ");
//document.write("<param name='EnableTracker' value='-1'> ");
//document.write("<param name='InvokeURLs' value='-1'> ");
//document.write("<param name='Language' value='-1'> ");
//document.write("<param name='Mute' value='0'> ");
//document.write("<param name='PlayCount' value='1'> ");
//document.write("<param name='PreviewMode' value='0'> ");
//document.write("<param name='Rate' value='1'> ");
//document.write("<param name='SAMILang' value=''> ");
//document.write("<param name='SAMIStyle' value=''> ");
//document.write("<param name='SAMIFileName' value=''> ");
//document.write("<param name='SelectionStart' value='-1'> ");
//document.write("<param name='SelectionEnd' value='-1'> ");
//document.write("<param name='SendOpenStateChangeEvents' value='-1'> ");
//document.write("<param name='SendWarningEvents' value='-1'> ");
//document.write("<param name='SendErrorEvents' value='-1'> ");
//document.write("<param name='SendKeyboardEvents' value='0'> ");
//document.write("<param name='SendMouseClickEvents' value='0'> ");
//document.write("<param name='SendMouseMoveEvents' value='0'> ");
//document.write("<param name='SendPlayStateChangeEvents' value='-1'> ");
//document.write("<param name='ShowCaptioning' value='0'> ");
//document.write("<param name='ShowControls' value='0'> ");
//document.write("<param name='ShowAudioControls' value='-1'> ");
//document.write("<param name='ShowDisplay' value='0'> ");
//document.write("<param name='ShowGotoBar' value='0'> ");
//document.write("<param name='ShowPositionControls' value='-1'> ");
//document.write("<param name='ShowStatusBar' value='-1'> ");
//document.write("<param name='ShowTracker' value='1'> ");
document.write("<param name='TransparentAtStart' value='-1'> ");
//document.write("<param name='VideoBorderWidth' value='0'> ");
//document.write("<param name='VideoBorderColor' value='0'> ");
//document.write("<param name='VideoBorder3D' value='0'> ");
//document.write("<param name='WindowlessVideo' value='0'> ");
//document.write("<param name='Volume' value='0'> ");
document.write("</object> ");
}

function MoviePlayer(M_Movie, M_Auto, M_Count, M_Width, M_Height)
{
	return "<object id=\"NSPlay\" width='" + M_Width + "' height='" + M_Height + "' viewastext style=\"z-index:1\" classid=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" standby=\"Loading Microsoft Windows Media Player components...\" type=\"application/x-oleobject\"><param name=\"FileName\" value=\"" + M_Movie + "\"><param name=\"ANIMATIONATSTART\" value=\"0\"><param name=\"AUTOSTART\" value=\"" + M_Auto + "\"><param name=\"BALANCE\" value=\"0\"><param name=\"CURRENTMARKER\" value=\"0\"><param name=\"CURRENTPOSITION\" value=\"0\"><param name=\"DISPLAYMODE\" value=\"4\"><param name=\"ENABLECONTEXTMENU\" value=\"0\"><param name=\"ENABLED\" value=\"1\"><param name=\"FULLSCREEN\" value=\"0\"><param name=\"INVOKEURLS\" value=\"1\"><param name=\"PLAYCOUNT\" value=\"" + M_Count + "\"><param name=\"RATE\" value=\"1\"><param name=\"SHOWCONTROLS\" value=\"1\"><param name=\"SHOWSTATUSBAR\" value=\"-1\"><param name=\"STRETCHTOFIT\" value=\"0\"><param name=\"TRANSPARENTATSTART\" value=\"1\"><param name=\"UIMODE\" value=\"FULL\"><param name=\"displaybackcolor\" value=\"9b9a99\"></object>";
}

