// JavaScript Document

//ウインドウサイズ取得
function getWindowWidth(){
    if(window.innerWidth){
        return window.innerWidth;
    }else if(document.documentElement && document.documentElement.clientWidth){
        return document.documentElement.clientWidth;
    }else if ( document.body && document.body.clientWidth){
        return document.body.clientWidth;
    }
}

function getWindowHeight(){
    if(window.innerHeight){
        return window.innerHeight;
    }else if(document.documentElement && document.documentElement.clientHeight){
        return document.documentElement.clientHeight;
    }else if ( document.body && document.body.clientHeight){
        return document.body.clientHeight;
    }
}

//ウインドウサイズに合わせてAjaxモーダル表示
function openAjaxWindow(shop_name,shop_dir,param){
	var ww = getWindowWidth();
	var wh = getWindowHeight() -80;
	var sw = 0;
	wdview = new Array("apis_florea","quiestce");
	
	for(i=0;i<wdview.length;i++){
		if(shop_dir == wdview[i]){
			window.open("/shop/" + shop_dir + "/index.php","_blank");
			sw = 1;
			break;
		}
	}
	if(sw != 1){		
		var path = "/shop/" + shop_dir + "/index.php?view=ajax" + param +"&width=" + "820" + "&height=" + wh + "";
		tb_show(shop_name,path);
	}
}




