//Select your country
function SelCountry()
{
document.writeln("<table cellpadding='0' cellspacing='0' border='0'>");
document.writeln("<form>");
document.writeln("<tr>");																		
document.writeln("	<td><img src='/images/tit_selectcountry.gif' width='187' height='22' alt='' border='0'></td>");
document.writeln("<tr>");
document.writeln("	<td>");
document.writeln("			<select style='width:190;'>");
document.writeln("				<option>Select Your Country</option>");
document.writeln("			</select><img src='/images/Bt_go.gif' width='19' height='19' alt='' border='0' hspace='5' align='absmiddle'>");
document.writeln("	</td>");												
document.writeln("</tr>");
document.writeln("</form>");
document.writeln("</table>");
}


// Product Search 
function ProdSrch()
{
document.writeln("<table cellpadding='0' cellspacing='1' border='0' width='610' bgcolor='#C0C0C0'>");
document.writeln("        <tr> ");
document.writeln("          <td height='25' bgcolor='#EAF4F2'> ");
document.writeln("            <table cellpadding='0' cellspacing='0' border='0'>");
document.writeln("              <tr> ");
document.writeln("                <form>");
document.writeln("                  <td width='14'><img src='/images/spacer.gif' width='1' height='1'></td>");
document.writeln("                  <td class='copy_b'>Product Part Number Search</td>");
document.writeln("                  <td width='10'><img src='/images/spacer.gif' width='1' height='1'></td>");
document.writeln("                  <td> ");
document.writeln("                    <input type='Text' style='width:100' class='search'>");
document.writeln("                  </td>");
document.writeln("                  <td width='10' align='center'> - </td>");
document.writeln("                  <td> ");
document.writeln("                    <input type='Text' style='width:70' class='search'>");
document.writeln("                  </td>");
document.writeln("                  <td width='30' align='center'><img src='/images/Bt_go.gif'  border='0'></td>");
document.writeln("                  <td width='5'><img src='/images/spacer.gif' width='1' height='1'></td>");
document.writeln("                  <td class='copy_b'>| <a href='#'>Tip</a> |</td>");
document.writeln("                  <td width='30'><img src='/images/spacer.gif' width='1' height='1'></td>");
document.writeln("                  <td class='copy_b'><a href='#'>parametric Search >></a></td>");
document.writeln("                </form>");
document.writeln("              </tr>");
document.writeln("            </table>");
document.writeln("          </td>");
document.writeln("        </tr>");
document.writeln("</table>");
}


// Semi 
function SemiMenu()
{
document.writeln("<table cellpadding='0' cellspacing='0' border='0' width='100%'>");
document.writeln("<tr>");
document.writeln("	<td height='22' valign='bottom'>");
document.writeln("		<table cellpadding='0' cellspacing='0' border='0'>");
document.writeln("		<tr>");
document.writeln("			<td><a href=javascript:GoUrl('semi')><img src='/Products/Semiconductor/images/Tmenu_home.gif' width='135' height='22' border='0'></a></td>");
document.writeln("			<td><img src='/Products/Semiconductor/images/cell.gif' width='10' height='20' border='0'></td>");
document.writeln("			<td><a href=javascript:GoUrl('news')><img src='/Products/Semiconductor/images/Tmenu_01.gif' width='47' height='20' border='0'></a></td>");
document.writeln("			<td><img src='/Products/Semiconductor/images/cell.gif' width='10' height='20' border='0'></td>");
document.writeln("			<td><a href=javascript:GoUrl('semi_prod')><img src='/Products/Semiconductor/images/Tmenu_02.gif' width='63' height='20' border='0'></a></td>");
document.writeln("			<td><img src='/Products/Semiconductor/images/cell.gif' width='10' height='20' border='0'></td>");
document.writeln("			<td><a href=javascript:GoUrl('semi_support')><img src='/Products/Semiconductor/images/Tmenu_03.gif' width='59' height='20' border='0'></a></td>");
document.writeln("			<td><img src='/Products/Semiconductor/images/cell.gif' width='10' height='20' border='0'></td>");
document.writeln("			<td><a href=javascript:GoUrl('sales')><img src='/Products/Semiconductor/images/Tmenu_04.gif' width='95' height='20' border='0'></a></td>");
document.writeln("			<td><img src='/Products/Semiconductor/images/cell.gif' width='10' height='20' border='0'></td>");
document.writeln("			<td><a href=javascript:GoUrl('info')><img src='/Products/Semiconductor/images/Tmenu_05.gif' width='80' height='20' border='0'></a></td>");
document.writeln("		</tr>");
document.writeln("		</table>");
document.writeln("	</td>");
document.writeln("</tr>");
document.writeln("<tr>");
document.writeln("	<td height='14'></td>");
document.writeln("</tr>");
document.writeln("</table>");
}

		
//Main Menu RollOver
function ImgPreLoad(imgTitle, imageNum) {
		imageNum++;
		rollOver = new Array(imageNum);
		rollOut = new Array(imageNum);
		for (j = 1; j <= imageNum; j++) {
			if (j < 10) {
				retmp = "_0";
			} else {
				retmp ="_";
			}
			rollOver[j] = new Image();
			rollOver[j].src = imgTitle + retmp + j + "_on.gif";
			rollOut[j] = new Image();
			rollOut[j].src = imgTitle + retmp + j + "_off.gif";
		}
	}

	function imgOver(Number) {
		if (rollOver[Number] != null) {
			document["w"+Number].src = rollOver[Number].src;
		}
	}

	function imgOut(Number) {
		if (rollOver[Number] != null) {
			if (Number != _MCurrentOn) {
				document["w"+Number].src = rollOut[Number].src;
			}
		}
	}

	//SemiMenu 
	function PreImgLoad(Title, imgNum) {
		imgNum++;
		rollOn = new Array(imgNum);
		rollOff = new Array(imgNum);
		for (i = 1; i <= imgNum; i++) {
			if (i < 10) {
				tmp = "_0";
			} else {
				tmp ="_";
			}
			rollOn[i] = new Image();
			rollOn[i].src = Title + tmp + i + "_on.gif";
			rollOff[i] = new Image();
			rollOff[i].src = Title + tmp + i + "_off.gif";
		}
	}

	function imgOn(Num) {
		if (rollOn[Num] != null) {
			document["r"+Num].src = rollOn[Num].src;
		}
	}

	function imgOff(Num) {
		if (rollOn[Num] != null) {
			if (Num != _SCurrentOn) {
				document["r"+Num].src = rollOff[Num].src;
			}
		}
	}



/// WRITE SWF
function WriteSwf(img,wsize,hsize,opt){
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\""+wsize+"\" height=\""+hsize+"\">");
    document.write("<param name=\"movie\" value=\""+img+"\">");
    document.write("<param name=\"quality\" value=\"high\">");
    document.write("<param name=wmode value=transparent>");

    if(opt != null){
    	var params = opt.split("&");

    	for(var i=0;i<params.length;i++){
    		  var tmp = params[i];
		      var paramss = tmp.split(">>");

		      var strAtt = paramss[0];
		      var strVal = paramss[1];

		      document.write("<param name="+strAtt+" value="+strVal+"> \n");

		      strAtt="";
		      strVal="";

    	}
    }

    document.write("<embed src=\""+img+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+wsize+"\" height=\""+hsize+"\" wmode=\"transparent\"></embed>");
	document.write("</object>");
}

function WriteMov(img,wsize,hsize){
	document.write("<OBJECT ID=\"MediaPlayer\" WIDTH="+wsize+" HEIGHT="+hsize+" ");
	document.write("CLASSID=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\"");
	document.write("STANDBY=\"Loading Windows Media Player components...\" ");
	document.write("TYPE=\"application/x-oleobject\">");
	document.write("<PARAM NAME=\"FileName\" VALUE=\""+img+"\">");
	document.write("<PARAM NAME=\"autoStart\" VALUE=\"true\">");
	document.write("<PARAM NAME=\"showControls\" VALUE=\"false\">");
	document.write("<EMBED TYPE=\"application/x-mplayer2\" SRC=\""+img+"\"");
	document.write("  autoStart=1");
	document.write("  showControls=0");
	document.write(" NAME=\"MediaPlayer\"");
	document.write(" WIDTH="+wsize+"");
	document.write(" HEIGHT="+hsize+"");
	document.write(" PLUGINSPAGE=\"http://www.microsoft.com/windows/windowsmedia/download/\">");
	document.write("</EMBED>");
	document.write("</OBJECT>");
}