﻿<!--
// * For UTF-8 Check : UTF-8変換ツール
var loaddingWin;

function gotoshow(){
  window.location = slidelinks[RotateLink];
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i>a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
  
//function slideit(){
//  if (!document.images) return
//  //if (ie55) document.images.slideobj.filters[0].apply()
//  document.images.slideobj.src = imageholder[RotateImage].src
//  //if (ie55) document.images.slideobj.filters[0].play()
//  RotateLink  = RotateImage;
//  RotateImage = (RotateImage < slideimages.length - 1) ? RotateImage + 1 : 0
//  //setTimeout("slideit()",slidespeed + pixeldelay)
//  setTimeout("slideit()",slidespeed)
//}

function WhereToBuyChangeLocation_(oSrcElm){
  if(oSrcElm.selectedIndex > 0){
    document.location.href = oSrcElm.options[oSrcElm.selectedIndex].value;
  }
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);

function openPlayer( inURL ){
  MediaWin = window.open(inURL, "MediaWin" ,"toolbar=no,width=400,height=510,status=no,scrollbars=no,resize=no,menubar=no");
}

function gjOpenWin_(cURL,cWidth,cHeight){
 oNewWin = window.open(cURL,"IEIPopWin","toolbar=no,width=" + cWidth + ",height=" + cHeight + ",status=no,scrollbars=yes,resize=no,menubar=no");
}

function gjfShowLoading_(){
  loaddingWin = window.showModelessDialog("../template/loaddata.htm","data transmitting","dialogHeight=40px;dialogWidth=230px;center=1;status=0;help=0;resizable=0");	
} 

function checkSubmit_(){
	if(productsearch.keywordinput.value!=''){
		for(var i=0; i<productsearch.searchby.options.length;i++){
		if(productsearch.searchby.options[i].selected==true){
			switch(productsearch.searchby.options[i].value){
			case 'model':
				productsearch.model.value = productsearch.keywordinput.value; 
				break;
			case 'keyword':
				productsearch.keyword.value = productsearch.keywordinput.value; 
				break;
			case 'spec':
				productsearch.spec.value = productsearch.keywordinput.value; 
				break;
			}  
		}
		}
	}else{
		alert("Please input keyword!");
		productsearch.keywordinput.onfocus = true;
	}
}

function checkSubmit2_(){
//alert(productsearch.keyword.value);
	productsearch.model.value ="";
	productsearch.spec.value = "";
	if(productsearch.keyword.value!=''){            
			switch(productsearch.searchby.value){
			case 'model':
				productsearch.model.value = "model";
				break;
			case 'keyword':
				break;
			case 'spec':
				productsearch.spec.value = "spec";
				break;
			}
	}else{
		alert("Please input keyword!");
		//document.productsearch.keyword.onfocus = true;
        return false;
	}
}

function gjRefWin_( sPath ){
  //var sPath = "<%=Application("ModuleRoot")%>/_utils/IEIProject/reflist.asp?a=" + sType;
  var strFeatures = "dialogWidth=400px;dialogHeight=200px;center=yes;help=no";
  //var st = oTrgElm.value;
  var returnData = showModalDialog(sPath,"",strFeatures);
  //oTrgElm.value = returnData;
  return( returnData );
}
            
function formfieldcheck_( oSrcfield , cErrMsg ){
  if(oSrcfield.value == ""){
    alert(cErrMsg);
    oSrcfield.focus();
    return false;
  }else{
    return true;
  }
}            
              
 function OnPrintPage( cPrintURL ){
	var oDoc = window.document;	
	var strPrintPage = cPrintURL;				
	var strLoc = window.location.href;
	if (window.navigator.userAgent.indexOf("MSIE ")!=-1 && navigator.appVersion.substr(0, 1) >= 4){
		if( oDoc.printHiddenFrame == null){
			oDoc.body.insertAdjacentHTML("beforeEnd", "<iframe name='printHiddenFrame' width='0' height='0'></iframe>");
			framedoc = oDoc.printHiddenFrame.document;
			framedoc.open();
			framedoc.write(
				"<frameset name=test onload='printMe.focus();printMe.print();' rows=\"100%\">" +
				"<frame name=printMe src=\""+strPrintPage+"\">" +
				"</frameset>");							
			framedoc.close();
		}
		else{
			oDoc.printHiddenFrame.printMe.focus();
			oDoc.printHiddenFrame.printMe.print();
			//oWnd.printHiddenFrame.close();
		}			
	}
	else{
		gjOpenWin_(cPrintURL , 480, 640);
	}
	return true;
} 

function _SelectedValue( inSelection ){
	if( inSelection.options.length > 0 ) {
		return( trim( inSelection.options[ inSelection.selectedIndex ].value ));
	} else {
		return( "" );
	}
}

function _SelectedText( inSelection ){
	if( inSelection.options.length > 0 ) {
		return( _interop_getTextValue( inSelection.options[ inSelection.selectedIndex ] ));
	} else {
		return( "" );
	}
}

function _interop_getTextValue( oNode ){

	var oChildList = oNode.childNodes;
	var retVal = "";
	
	for( var i = 0; i < oChildList.length; i++ ){
		var oCurrentChild = oChildList[i];
		retVal += _interop_getTextValue( oCurrentChild );		
	}
	
	if( oNode.nodeType == 3 ){
		return( trim( oNode.nodeValue ) );
	} else {
		return( retVal );
	}
}

function ltrim ( s )
{
	return s.replace( /^\s*/, "" );
}

function rtrim ( s )
{
	return s.replace( /\s*$/, "" );
}

function trim ( s )
{
	return rtrim(ltrim(s));
}

-->