function win_open_placard(ATSUMI){

//プラスチックカードオーダーフォームを同じウィンドウで開く

var form = document.hidden_data;

orderdata = encodeURI(form.elements["orderdata"].value + ATSUMI);

location.href = "https://www.card-insatsu.biz/contact/pladesign/order_form.html?" + orderdata;

}


function win_open_papercard(ATSUMI){

//紙カードオーダーフォームを同じウィンドウで開く

var form = document.hidden_data;

orderdata = encodeURI(form.elements["orderdata"].value + ATSUMI);

location.href = "https://www.card-insatsu.biz/contact/paperdesign/order_form.html?" + orderdata;

}



//グローバル変数宣言
var title;
var filename;
var color;
var atsumi;


function arraydatachk(){

GetParam = location.search.slice(1);//頭の"?"をカット

GetParamArray = GetParam.split("%2526");//GetParamの値を&で区切って配列に格納

title = decodeURI(GetParamArray[0]);
filename = decodeURI(GetParamArray[1]);
color = decodeURI(GetParamArray[2]);
atsumi = decodeURI(GetParamArray[3]);

}


//フォーム内のブロック表示／非表示の切り替え
function disp(id){

if(document.getElementById(id).style.display == 'none')
{document.getElementById(id).style.display = 'block';}
else{document.getElementById(id).style.display = 'none';}
}


//裏面印刷する場合は、裏面デザインの選択肢を表示
function uramenchk() {
    if(document.mail_form.elements["うら面印刷"][0].checked == true) {//裏面印刷なしがチェックされてたら
document.getElementById('uramendesign').style.display = 'none';//デザイン選択欄は出ない
    } else if(document.mail_form.elements["うら面印刷"][1].checked == true || document.mail_form.elements["うら面印刷"][2].checked == true) {//「裏面印刷あり」か「裏面シール」がチェックされてたら
document.getElementById('uramendesign').style.display = 'block';//デザイン選択欄が出る
    }
}


function win_open_option(){

//オプション商品オーダーフォームをポップアップで開く

window.open('/option_orderform.html','subwin','toolbar=0,scrollbars=1,status=1,height=650,width=750');

}


function hide_nouhinsaki(){
document.getElementById('nouhinsaki').style.display = 'none';
document.getElementById('sozaiuri').style.display = 'none';
}


function hide_nouhinsaki_sozai(){
document.getElementById('nouhinsaki').style.display = 'none';
}


function hide_comments(){
document.getElementById('comments-open-data').style.display = 'none';
}



function commentagreecheck(){

if (document.getElementById('cmtagreedcheck').checked ==true) {
document.getElementById('comments-open-data').style.display = 'block';
} else {
document.getElementById('comments-open-data').style.display = 'none';
}

}



//==================「編集位置を確認する」虫眼鏡を5つ書き出す

function openurl(){

var URL = filename;
var TITLE = title;


var kakudai = document.getElementById('naire0');

var kakudaiurl = '<a href="../common_files/thumbnails/' + URL + '-l.jpg" rel="lightbox[img0]" title="' + TITLE + '">';

kakudai.innerHTML = kakudaiurl + '<img src="../common_files/thumbnails/' + URL + '-s.jpg" width="150" height="95" alt="編集位置を確認する" /></a>'


for (i=1; i<6; i++){

var kakudai = document.getElementById('naire' + i);

var kakudaiurl = '<a href="../common_files/thumbnails/' + URL + '-l.jpg" rel="lightbox[img' + i + ']" title="' + TITLE + '">';

kakudai.innerHTML = kakudaiurl + '<img src="../common_files/images/form_kakudai.gif" width="23" height="22" alt="編集位置を確認する" /></a>';


}


var form = document.mail_form;

form.elements["おもて面印刷"].value = color;
form.elements["デザインサンプル名"].value = title;

if(atsumi == "0.76mm"){
document.getElementById('pla076').selected = true;

} else if(atsumi == "0.50mm") {
document.getElementById('pla050').selected = true;

} else if(atsumi == "0.30mm") {
document.getElementById('pla030').selected = true;

}


document.getElementById('nouhinsaki').style.display = 'none';
document.getElementById('sozaiuri').style.display = 'none';


}
