// JavaScript Document

function previewPop(URL,Speed){
	var movieDomain = "http://www.twellv.co.jp/minogashi/";
	var ScaleX = 0,ScaleY = 0;
	if(Speed == "Low"){
		ScaleX = 480;
		ScaleY = 333;
	}else {
		ScaleX = 640;
		ScaleY = 430;
	}
	window.open(movieDomain+URL,'previewPop','width='+ScaleX+',height='+ScaleY+',menubar=no,toolbar=no,resizable=no,scrollbars=no');
}

function mailEncode(){
	if (navigator.userAgent.indexOf("Safari") != -1) {
		document.getElementById("mailAnchor").href="mailto:info@globalvision-tv.com?subject=◆問い合わせ【globalvision-tv.com】";
	}
	if (navigator.userAgent.indexOf("Macintosh") != -1) {
		if (navigator.userAgent.indexOf("Firefox") != -1) {
			document.getElementById("mailAnchor").href="mailto:info@globalvision-tv.com?subject=◆問い合わせ【globalvision-tv.com】";
		}
	}
}
function mailSitemap(){
	if (navigator.userAgent.indexOf("Safari") != -1) {
		document.getElementById("mailAnchor2").href="mailto:info@globalvision-tv.com?subject=◆問い合わせ【globalvision-tv.com】";
	}
	if (navigator.userAgent.indexOf("Macintosh") != -1) {
		if (navigator.userAgent.indexOf("Firefox") != -1) {
			document.getElementById("mailAnchor2").href="mailto:info@globalvision-tv.com?subject=◆問い合わせ【globalvision-tv.com】";
		}
	}
}


/* ------------------------------------------
	/theme/index.html
	/theme/archive/


------------------------------------------ */
function setFNaviBorder(){
	var elms = document.getElementById("ftNaviList").getElementsByTagName("li");
	for(var i=0,l=elms.length-1;i<l;i++){
		elms[i].style.borderRight="1px solid #990000";
	}
}

function backNumberSelect(pageLocation){
	var optionSelect = "backNumber_vol"+pageLocation;
	if(document.getElementById(optionSelect)){
		document.getElementById(optionSelect).setAttribute("selected","selected");
	}
}

function previewBtnShow(pageLocation){
	var optionLength = document.getElementById("backNumberSelector").getElementsByTagName("option").length;
	if((optionLength)-(pageLocation*1)<4){
		document.getElementById("previewBtn").style.display ="block";
	}
}