var remoteHost ="http://www.javezz.com/newhome/" ;
var REPLINK ="" ;

function winPageOpen(strUrlArr) {
		// Main 아이콘
    if (strUrlArr =="000000")
	    window.open("http://www.javezz.com","_parent","");

		// 메뉴 클릭 시작
    if (strUrlArr =="100000")
    	window.open("/newhome/index.asp?MenuNum=1_1"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="110000")
    	window.open("/newhome/index.asp?MenuNum=1_1"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="120000")
    	window.open("/newhome/index.asp?MenuNum=1_2"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="130000")
    	window.open("/newhome/index.asp?MenuNum=1_3"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="140000")
    	window.open("/newhome/index.asp?MenuNum=1_4"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="150000")
    	window.open("/newhome/index.asp?MenuNum=1_5"+"&REPLINK="+strUrlArr,"_self","");

    if (strUrlArr =="200000")
    	window.open("/newhome/index.asp?MenuNum=2_1"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="210000")
    	window.open("/newhome/index.asp?MenuNum=2_1"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="220000")
    	window.open("/newhome/index.asp?MenuNum=2_2"+"&REPLINK="+strUrlArr,"_self","");
   
    if (strUrlArr =="230000")
    	window.open("/newhome/business/basecamp_proj.asp?REPLINK="+strUrlArr,"_self","");


    if (strUrlArr =="231101")
    	window.open("/newhome/business/basecamp_proj.asp?REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="231201")
    	window.open("/newhome/business/basecamp_listAJ.asp?bbsType=ARTJA&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="231202")
    	window.open("/newhome/business/basecamp_listAJ.asp?bbsType=ARTMA&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="231203")
    	window.open("/newhome/business/basecamp_listAJ.asp?bbsType=ARTON&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="231204")
    	window.open("/newhome/business/basecamp_listAJ.asp?bbsType=ARTAD&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="231301")
    	window.open("/newhome/business/basecamp_listAJ.asp?bbsType=BLOMA&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="231302")
    	window.open("/newhome/business/basecamp_listAJ.asp?bbsType=BLOCD&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="231303")
    	window.open("/newhome/business/basecamp_listAJ.asp?bbsType=BLOON&REPLINK="+strUrlArr,"_self","");

    if (strUrlArr =="231401")
    	window.open("/newhome/business/basecamp_listAJ.asp?bbsType=BBSQA&REPLINK="+strUrlArr,"_self","");




    if (strUrlArr =="240000")
    	window.open("/newhome/index.asp?MenuNum=2_4"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="250000")
    	window.open("/newhome/index.asp?MenuNum=2_5"+"&REPLINK="+strUrlArr,"_self","");

    if (strUrlArr =="300000")
   		window.open("/newhome/services/services.asp?workType=100"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400000")
    	window.open("/newhome/work/work.asp?workType="+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400100")
    	window.open("/newhome/services/services.asp?workType="+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400101")
    	window.open("/newhome/services/services.asp?workType=101"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400102")
    	window.open("/newhome/services/services.asp?workType=102"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400103")
    	window.open("/newhome/services/services.asp?workType=103"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400104")
    	window.open("/newhome/services/services.asp?workType=104"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400105")
    	window.open("/newhome/services/services.asp?workType=105"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400106")
    	window.open("/newhome/services/services.asp?workType=106"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400107")
    	window.open("/newhome/services/services.asp?workType=107"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400200")
    	window.open("/newhome/work/work.asp?workType="+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400201")
    	window.open("/newhome/work/work.asp?workType=101"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400202")
    	window.open("/newhome/work/work.asp?workType=102"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400203")
    	window.open("/newhome/work/work.asp?workType=103"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400204")
    	window.open("/newhome/work/work.asp?workType=104"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400205")
    	window.open("/newhome/work/work.asp?workType=105"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400206")
    	window.open("/newhome/work/work.asp?workType=106"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400207")
    	window.open("/newhome/work/work.asp?workType=107"+"&REPLINK="+strUrlArr,"_self","");

    if (strUrlArr =="400300")
    	window.open("/newhome/contact/contact_request.asp"+"?REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="400301")
    	window.open("/newhome/contact/contact_request.asp"+"?REPLINK="+strUrlArr,"_self","");

    if (strUrlArr =="500000")
    	window.open("/newhome/contact/news.asp"+"?REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="510000")
    	window.open("/newhome/contact/news.asp"+"?REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="520000")
    	window.open("/newhome/contact/find_us.asp"+"?REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="530000")
    	window.open("/newhome/contact/contact_request.asp"+"?REPLINK="+strUrlArr,"_self","");
		// 메뉴 클릭 끝


		// 공통
    if (strUrlArr =="CC0101")
    	window.open("/newhome/index.asp?MenuNum=2_1"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="CC0102")
    	window.open("/newhome/contact/contact_request.asp"+"?REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="CC0103")
    	window.open("/newhome/business/basecamp_proj.asp?REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="CC0104")
    {
    	window.open("/newhome/portfolio.zip","_self","");
    	winTrack("D", "D","D","D") ;
    }
    if (strUrlArr =="CC0105")
	    window.open("/newHome/contact/contact_request.asp"+"&REPLINK="+strUrlArr,"_self","");
		// 공통 끝


		// 각 페이지 링크 값
    if (strUrlArr =="000101")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=101"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="000102")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=102"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="000103")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=103"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="000104")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=104"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="000105")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=105"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="000106")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=106"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="000107")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=107"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="000201"){}
    if (strUrlArr =="000202")
	    window.open("/newhome/index.asp?MenuNum=2_1"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="000203")
	    window.open("/newhome/contact/news.asp"+"?REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="210101")
    {
	    var BusiWin = window.open("/newhome/business/process_sub01.asp"+"?REPLINK="+strUrlArr,"BusiWin","width=803,height=575,scrollbars=no");
	    BusiWin.focus();
	  }
    if (strUrlArr =="210102")
    {
	    var BusiWin = window.open("/newhome/business/process_sub02.asp"+"?REPLINK="+strUrlArr,"BusiWin","width=858,height=461,scrollbars=no");
	    BusiWin.focus();
	  }
    if (strUrlArr =="210103")
    {
			opener.document.location.href("http://www.javezz.com/newhome/services/services.asp?MenuNum=4_0"+"&REPLINK="+strUrlArr) ;
	    window.close();
	  }
    if (strUrlArr =="210104")
    {
			opener.document.location.href("http://www.javezz.com/newhome/services/services.asp?MenuNum=4_0"+"&REPLINK="+strUrlArr) ;
	    window.close();
	  }
	  
    if (strUrlArr =="230101")
	    window.open("/newHome/contact/contact_request.asp"+"?REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="300101")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=101"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="300102")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=102"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="300103")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=103"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="300104")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=104"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="300105")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=105"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="300106")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=106"+"&REPLINK="+strUrlArr,"_self","");
    if (strUrlArr =="300107")
	    window.open("/newhome/services/services.asp?MenuNum=3_1&workType=107"+"&REPLINK="+strUrlArr,"_self","");
}
function winSendBaseCamp(vName, vPhone, vMail){
	window.open("/newHome/admin/BSCampInsert.asp?vName="+vName+"&vPhone="+vPhone+"&vMail="+vMail,"hiddenFrame","");
	alert("참여해 주셔서 감사합니다.") ;
}
function winopMain() {
    window.open("http://www.javezz.com","_parent","");
}
function winopJavezz(strURL) {
    window.open("/newhome/index.asp?MenuNum="+strURL,"_self","");
}
function winopBusiness(strURL) {
    window.open("/newhome/index.asp?MenuNum="+strURL,"_self","");
}
function winopServices(strURL) {
    window.open("/newhome/services/services.asp?MenuNum="+strURL,"_self","");
}
function winopWork(strURL) {
    window.open("/newhome/work/work.asp?MenuNum="+strURL,"_self","");
}
function winopContact(strURL) {
    window.open("/newhome/index.asp?MenuNum="+strURL,"_self","");
}

function winopBanner01() {
    window.open("/newhome/index.asp?MenuNum=2_1","_self","");
}
function winopBanner02() {
    window.open("/newhome/contact/contact_request.asp","_self","");
}
function winopBanner03() {
    	window.open("/newhome/business/basecamp_proj.asp?REPLINK="+strUrlArr,"_self","");
}
function winopBanner04() {
    location.href ="/newhome/portfolio.zip";
}
function winopJavezz01() {
    winopJavezz("1_1") ;
}
function winopJavezz02() {
    winopJavezz("1_2") ;
}
function winopJavezz03() {
    winopJavezz("1_3") ;
}
function winopJavezz04() {
    winopJavezz("1_4") ;
}
function winopJavezz05() {
    winopJavezz("1_5") ;
}
function winopBusiness01() {
    winopBusiness("2_1") ;
}
function winopBusiness02() {
    winopBusiness("2_2") ;
}
function winopBusiness03() {
    winopBusiness("2_3") ;
}


function winopWork01() {
    winopWork("4_0") ;
}
function winopWork02() {
    winopWork("4_0&workType=101") ;
}
function winopWork03() {
    winopWork("4_0&workType=102") ;
}
function winopWork04() {
    winopWork("4_0&workType=103") ;
}
function winopWork05() {
    winopWork("4_0&workType=104") ;
}
function winopWork06() {
    winopWork("4_0&workType=105") ;
}
function winopWork07() {
    winopWork("4_0&workType=106") ;
}
function winopWork08() {
    winopWork("4_0&workType=107") ;
}
function winopServices01() {
    winopServices("4_0") ;
}
function winopServices02() {
    winopServices("3_0&workType=101") ;
}
function winopServices03() {
    winopServices("3_0&workType=102") ;
}
function winopServices04() {
    winopServices("3_0&workType=103") ;
}
function winopServices05() {
    winopServices("3_0&workType=104") ;
}
function winopServices06() {
    winopServices("3_0&workType=105") ;
}
function winopServices07() {
    winopServices("3_0&workType=106") ;
}
function winopServices08() {
    winopServices("3_0&workType=107") ;
}

function winopContact01() {
    window.open("/newhome/contact/news.asp","_self","");
}
function winopContact02() {
    window.open("/newhome/contact/find_us.asp","_self","");
}
function winopContact03() {
    window.open("/newhome/contact/contact_request.asp","_self","");
}


function winopMediaWork(sMedia) {
    window.open("/newhome/work/work.asp?sMedia="+sMedia,"_self","");
}
function winopClientWork(sClient) {
    window.open("/newhome/work/work.asp?sClient="+sClient,"_self","");
}
function winopProcessService() {
		opener.document.location.href("http://www.javezz.com/newhome/services/services.asp?MenuNum=4_0") ;
    window.close();
}
function winopCaseRequest() {
		opener.document.location.href("http://www.javezz.com/newhome/contact/contact_request.asp") ;
    window.close();
}
function winopCaseRequestL() {
		location.href("http://www.javezz.com/newhome/contact/contact_request.asp") ;
}


function winopBusiness01_sub01()
{
    var BusiWin = window.open("/newhome/business/process_sub01.asp","BusiWin","width=803,height=575,scrollbars=no");
   	winTrack("2", "1","1","") ;
    BusiWin.focus();
    
}
function winopBusiness01_sub02()
{
    var BusiWin = window.open("/newhome/business/process_sub02.asp","BusiWin","width=858,height=461,scrollbars=no");
   	winTrack("2", "1","2","") ;
    BusiWin.focus();
}

function getCookie(str) {
  var binfo=document.cookie.split(";");
  var tmp="";
  for (var i=0; i<binfo.length; i++) {
   if (binfo[i].indexOf(str)>=0) {
    tmp=binfo[i].substring(binfo[i].indexOf("=")+1,binfo[i].length);
    break;
   }
  }
  return tmp;
}

function setCookie( name, value, expiredate, expiretime ) {         
	var todayDate = new Date();         
	todayDate.setDate( todayDate.getDate() + expiredate ); 
	todayDate.setTime( todayDate.getTime() + expiretime );        
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
}

function isEmail(str) {
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}

function put_flash( src, w, h ) {
	// exception Mirror~
   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="'+w+'" height="'+h+'">\n'+
  '<param name="movie" value="'+src+'">\n'+
  '<param name="quality" value="high">\n'+
  '<param name="wmode" value="transparent">\n'+
	'<embed src="'+src+'" wmode="transparent" quality="high" width="'+w+'" height="'+h+'"  allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n'+
'</object>' );
}
function put_flash_m( src, w, h, FlashVarString ) {
	// exception Mirror~
	if(FlashVarString!="depthNum=")
	{
		//alert(FlashVarString);
		   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="'+w+'" height="'+h+'" >\n'+
		  '<param name="movie" value="'+src+'" />\n'+
		  '<param name="quality" value="high" />\n'+
		  '<param name="wmode" value="transparent" />\n'+
		  '<param name="FlashVars" value="'+FlashVarString+'" />\n'+
		  '<embed src="'+src+'" quality="high" FlashVars="'+FlashVarString+'" wmode="transparent"  pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed>\n'+
		'</object>' );
	}
	else
	{
		   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="'+w+'" height="'+h+'" >\n'+
		  '<param name="movie" value="'+src+'" />\n'+
		  '<param name="quality" value="high" />\n'+
		  '<param name="wmode" value="transparent" />\n'+
		  '<embed src="'+src+'" quality="high" wmode="transparent"  pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed>\n'+
		'</object>' );
	}
}

function getBounds(tag) 
{ 
    var ret = new Object(); 
    if(document.all) { 
        var rect = tag.getBoundingClientRect(); 
        ret.left = rect.left + (document.documentElement.scrollLeft || document.body.scrollLeft); 
        ret.top = rect.top + (document.documentElement.scrollTop || document.body.scrollTop); 
        ret.width = rect.right - rect.left; 
        ret.height = rect.bottom - rect.top; 
    } else { 
        var box = document.getBoxObjectFor(tag); 
        ret.left = box.x; 
        ret.top = box.y; 
        ret.width = box.width; 
        ret.height = box.height; 
    } 
    return ret; 
}


function winTrack(mMenu, sMenu,sopt1,sopt2)
{
	window.open("/newHome/admin/TrackInsert.asp?mMenu="+mMenu+"&sMenu="+sMenu+"&sopt1="+sopt1+"&sopt2="+sopt2+"&REPLINK="+REPLINK+"","hiddenFrame","");
	//alert("/newHome/admin/TrackInsert.asp?mMenu="+mMenu+"&sMenu="+sMenu+"&sopt1="+sopt1+"&sopt2="+sopt2+"") ;
	//NaviInsert();
}
function winTrackRep(mMenu, sMenu,sopt1,sopt2,vREPLINK)
{
	window.open("/newHome/admin/TrackInsert.asp?mMenu="+mMenu+"&sMenu="+sMenu+"&sopt1="+sopt1+"&sopt2="+sopt2+"&REPLINK="+vREPLINK+"","hiddenFrame","");
	//alert("/newHome/admin/TrackInsert.asp?mMenu="+mMenu+"&sMenu="+sMenu+"&sopt1="+sopt1+"&sopt2="+sopt2+"") ;
	//NaviInsert();
}
function SwapImage(obj, sImage)
{
	//alert("test") ;
	//alert(document.getElementById(obj).src) ;
	document.getElementById(obj).value = document.getElementById(obj).src ;
	document.getElementById(obj).src = sImage ;
}
function ImageRestore(obj)
{
	//alert("test") ;
	//alert(document.getElementById(obj).src) ;
	document.getElementById(obj).src = document.getElementById(obj).value ;
}

function NaviInsert(){ 
	var strURL = document.URL;
	
	//strURL = strURL.replace("http://www.javezz.com/newhome/","") ;
	//strURL = strURL.replace("http://javezz.com/newhome/","") ;
	//alert(strURL);
	var strURLFile = "" ;
	var strURLFileLoc = "" ;
	var intURLCnt = 0 ;
	var intURLLoc = 0 ;
	var intURLLoc2 = 0 ;
	//var tmpCookie=getCookie("TransPromolog"); 






	for (var i=0; i<=strURL.length; i++) {
		//strURLFile = str.charAt(strURL.length-i) ;
		if(strURL.charAt(strURL.length-i) == "/" )
		{
			if(intURLCnt==0) {
					strURLFile = strURL.substr(strURL.length-i+1, i) ;
					intURLLoc = strURL.length-i+1 ;
					intURLLoc2 = intURLLoc  ;
					intURLCnt = 1 ;
			}
			else  {
					strURLFileLoc = strURL.substr(strURL.length-i+1, intURLLoc2-(strURL.length-i)-2) ;
					intURLCnt = 2 ;
					intURLLoc2 = strURL.length-i+1  ;
			}
		}
	}
	//alert(strURLFile) ;
	//alert(strURLFileLoc) ;


////Access Grant
	
	//alert(strURL) ;
/*	if(strURL!="/index_main.asp" &&strURL!="/index_main.asp#" &&strURLFileLoc!="edm" && tmpCookie=="") 
	{
		alert("Please Log-in");
	//	window.open("http://www.transpromo-singapore.com/loginFail.asp","subframe","")
		//LoginOpen();
	}
*/

//	window.open("/myspace/NaviInsert.asp?Nfile="+strURLFile+"&Nloc="+strURLFileLoc,"subframe","");
	
	
	//	alert(strURLFile) ;
	//	alert(strURLFileLoc) ;
//	alert(document.URL) ;
//	window.open("/myspace/NaviInsert.asp","subframe","");
	//setCookie("TransPromolog","test",0,0) ;
}