function popup(targets,sw,sh,sc) {

	var tw = sw;
	var th = browserCheck(sh);
	wx = tw;
	wy = th;
	var x = (screen.width - wx ) / 2;
	var y = (screen.height -wy ) / 2;
	
	var loc = "width="+tw+", height="+th+", scrollbars="+sc+", location=no, menubar=no, resizable=yes, status=no, toolbar=no, directories=no,left="+x+"px,top="+y+"px";
	window.open(targets, "_blank", loc);
}


function browserCheck(h) {
	var xh;
	var num = new Number(h);
	if(navigator.userAgent.indexOf("Firefox/2.0.0.14") != -1){
		xh = num+3;
	}else if(navigator.userAgent.indexOf("Firefox/2.0.0.15") != -1){
		xh = num-19;
	}else if(navigator.userAgent.indexOf("Firefox/3") != -1){
		xh = num-1;
	}else{
		xh = num;
	}
	/*alert(xh.toString());*/
	return xh.toString();
}



function retrieveGETqs(a) {
	//t-link:タブ
	//j-link:ページ内ジャンプ
	
	var query = window.location.search.substring(1);
	var parms = query.split('&');
	qsParm = new Array();
	for (var i=0; i<parms.length; i++) {
		var pos = parms[i].indexOf('=');
			
		if (pos > 0) {
			var key = parms[i].substring(0,pos);
			var val = parms[i].substring(pos+1);
			qsParm[key] = val;
			
		}
	}
	
	if(a == 1){
		tab1(qsParm[key])
	}else if(a == 2){
		tab2(qsParm[key])
	}else if(a == 7){
		tab7(qsParm[key])
	}else if(a == 9){
		tab9(qsParm[key])
	}
}

function openappli(){
	var orderpage = "https://www.telecomsquare.co.jp/smart/appli/order_form.php";
	subWin = window.open(orderpage, "order", "status=yes, toolbar=no, scrollbars=yes, resizable=no, width=800, height=800, top=50, left=50");
}

function open_idpass(){
      subWin = window.open("https://www.telecomsquare.co.jp/_idpass/agent/inc_order_login.php?id=0-22", "order", "status=yes,toolbar=no,scrollbars=yes,resizable=yes,width=850,height=800,top=50,left=50");
}
