//------ Nomura-re Shiryo Call Code ------//
function popup(target) {
  var shiryoWin = window.open("",target,"width=750,height=600,left=0,top=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no");
	shiryoWin.focus();
}
//----------------------------------------//



function NewWin(url,name) {
  str = 'scrollbars=yes,resizable=yes,width=840,height=600';
  var newW = window.open(url,name,str);
  newW.focus();
}

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_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_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_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 changeDBName(dbName){
	if(dbName=="M11_SALE_TOCHI"){
		return "SALETOCHI";
	}else if(dbName=="M12_SALE_KODATE"){
		return "SALEKODATE";
	}else if(dbName=="M13_SALE_MANSION"){
		return "SALEMANSION";
	}else if(dbName=="M14_SALE_ALLBUILDING"){
		return "SALEALLBUILDING";
	}else if(dbName=="M15_SALE_PARTBUILDING"){
		return "SALEPARTBUILDING";
	}else if(dbName=="M16_RENT_RESIDENCE"){
		return "RENTRESIDENCE";
	}else if(dbName=="M17_RENT_BUSINESS"){
		return "RENTBUSINESS";
	}
}

function changePriceChinryou(dbName){
	if((dbName=="M11_SALE_TOCHI")||(dbName=="M12_SALE_KODATE")||(dbName=="M13_SALE_MANSION")||(dbName=="M14_SALE_ALLBUILDING")||(dbName=="M15_SALE_PARTBUILDING")){
		return "Price";
	}else{
		return "Chinryou";
	}
}

function changeKoumoku(dbName, chinryou, chinryou_unit, price, price_unit, madoriheyakazu, madoritype, hensai, hensai_unit){
	if((dbName=="M11_SALE_TOCHI")||(dbName=="M12_SALE_KODATE")||(dbName=="M13_SALE_MANSION")||(dbName=="M14_SALE_ALLBUILDING")||(dbName=="M15_SALE_PARTBUILDING")){
		document.write ("<td class=koumoku_td><div class=koumoku_field>価格</div><div class=koumoku_value>"+price+" "+price_unit+"</div></td><td class=koumoku_space width=5px>&nbsp;</td><td class=koumoku_td><div class=koumoku_field>住宅ローン支払い額</div><div class=koumoku_value> 毎月 "+hensai+" "+hensai_unit+"</div></td>");

	}else{
		document.write ("<td class=koumoku_td><div class=koumoku_field>賃料</div><div class=koumoku_value>"+chinryou+" "+chinryou_unit+"</div></td><td class=koumoku_space width=5px>&nbsp;</td><td class=koumoku_td><div class=koumoku_field>間取り</div><div class=koumoku_value>"+madoriheyakazu+" "+madoritype+"</div></td>");
	}
}

function changeHeaderColor(dbName){
	if((dbName=="M11_SALE_TOCHI")||(dbName=="M12_SALE_KODATE")||(dbName=="M13_SALE_MANSION")||(dbName=="M14_SALE_ALLBUILDING")||(dbName=="M15_SALE_PARTBUILDING")){
		document.write ("<div class=project_header>");
	}else{
		document.write ("<div class=project_header_chintai>");
	}
}

function changeFooterColor(dbName){
	if((dbName=="M11_SALE_TOCHI")||(dbName=="M12_SALE_KODATE")||(dbName=="M13_SALE_MANSION")||(dbName=="M14_SALE_ALLBUILDING")||(dbName=="M15_SALE_PARTBUILDING")){
		document.write ("<div id=footer>");
	}else{
		document.write ("<div id=footer_chintai>");
	}
}

function changePowerd(dbName,src){
	if((dbName=="M11_SALE_TOCHI")||(dbName=="M12_SALE_KODATE")||(dbName=="M13_SALE_MANSION")||(dbName=="M14_SALE_ALLBUILDING")||(dbName=="M15_SALE_PARTBUILDING")){
		document.write ("<img src=powerd.gif alt=powerd by LocationProcessor />");
	}else{
		document.write ("<img src=powerd_chintai.gif alt=powerd by LocationProcessor />");
	}
}

function OpenWin(){
    window.open(
    //開けたいページのURL
    "http://www.dlink.co.jp/net/usr/prezen/setsumei/setsumei.html",
    //新しいウィンドウの名前
    "win",
    //新しいウィンドウのスタイル（いらない機能はnoにする。widthは横幅、heightは縦幅。※参照）
    "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=650,height=600");
}

var ZPanoramaPlayer;

// Internet Explorer and Mozilla-based browsers refer to the Flash application
// object differently.
// This function returns the appropriate reference, depending on the browser.
function getMyApp(appName)
{
        if (navigator.appName.indexOf ("Microsoft") !=-1)
        {
                return window[appName];
        }
        else
        {
                return document[appName];
        }
}

// After Flash player has constructed, this function wll be called.
function ZPanoramaPlayerInitChain()
{
        ZPanoramaPlayer = getMyApp("PanoramaPlayer");
}

function SetFileName(filename)
{
        if(ZPanoramaPlayer == null)
        {
                ZPanoramaPlayerInitChain();
        }
        ZPanoramaPlayer.SetFileName(filename);
}

function SetFileNameInFrame(iframeIndex, filename)
{
        window.frames[iframeIndex].SetFileName(filename);
}