/*------検索窓------*/
function commonSearchKey2(){
 if(document.commonSearch2.tx1.value.length == 0){
  alert("商品名や品番など検索したい情報を入力してください。");
  return false;
 } else {
  return true;
 }
}

/*------プラットフォームチェック------*/
if(navigator.userAgent.indexOf('Mac') != -1){
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/commonp/css/Mac.css" media="screen">')
}
if(navigator.userAgent.indexOf('Win') != -1){
if(navigator.appName.charAt(0)=="M"){
 document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/commonp/css/Win_MSIE6.css" media="screen">')
}else{
 document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/commonp/css/Win_NN6.css" media="screen">')
}
}

/*------カテゴリナビバースワップイメージ------*/
/*
var NavImage = new Array();
for( i=2; i<10; i++){
NavImage[i] = new Image();
NavImage[i].src="/commonp/img/top_navi_on_0"+i+".gif";
}
NavImage[10] = new Image();
NavImage[10].src="/commonp/img/top_navi_on_10.gif";
NavImage[11] = new Image();
NavImage[11].src="/commonp/img/top_navi_on_11.gif";
*/

function OnNavb(nvname,str){
document.images[nvname].src=str;
}


/*------ウィンドウオープン------*/

function openFreeWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

function  openWnWindow(theURL){
window.open(theURL,'whatnew','scrollbars=yes,width=480,height=344');
}
function  openWdWindow(theURL){
window.open(theURL,'word','scrollbars=yes,width=480,height=344');
}

function  openWdBWindow(theURL){
window.open(theURL,'word','scrollbars=yes,width=640,height=480');
}

function  openSPWindow(theURL){
window.open(theURL,'SP','scrollbars=no,width=480,height=344').focus();
}

function  openCMWindow(theURL){
var lp = (screen.width) ? (screen.width - 480)/2 : 0;
var tp = (screen.height) ? (screen.height - 344)/2 : 0;
window.open(theURL,'CM','scrollbars=no,width=480,height=344,'+'top='+tp+',left='+lp).focus();
}

function  openGdWindow(theURL){
var fh =  screen.availHeight-30;
window.open(theURL,'GD','scrollbars=yes,top=0,left=0,width=747,height='+fh).focus();
}

function  openEnqWindow(theURL){
EW = self.open(theURL,'Enq','toolbar=yes,menubar=yes,status=yes,scrollbars=yes,resizable=yes,location=no');
EW.focus();
return false;
}

function  openFullWindow(theURL){
var fw =  screen.availWidth-10;
var fh =  screen.availHeight-30;
window.open(theURL,'Full','scrollbars=yes,top=0,left=0,width='+fw+',height='+fh).focus();
}

function writeFlash(str){
	document.write(str);
}