
function setHeading(){
	var geth4 = document.getElementsByTagName("h4");
	for(i = 0; i < geth4.length; i++){
		outerh4 = geth4[i].parentNode.innerHTML;
		geth4[i].parentNode.innerHTML = outerh4.replace(/([\w])(<\/h4>)([\w])/gi, function(){ return arguments[1] + " " + arguments[2] + arguments[3]});
	}
	var geth3 = document.getElementsByTagName("h3");
	for(i = 0; i < geth3.length; i++){
		outerh3 = geth3[i].parentNode.innerHTML;
		geth3[i].parentNode.innerHTML = outerh3.replace(/([\w])(<\/h3>)([\w])/gi, function(){ return arguments[1] + " " + arguments[2] + arguments[3]});
	}
	var geth2 = document.getElementsByTagName("h2");
	for(i = 0; i < geth2.length; i++){
		outerh2 = geth2[i].parentNode.innerHTML;
		geth2[i].parentNode.innerHTML = outerh2.replace(/([\w>])(<\/h2>)([\w<])/i, function(){ return arguments[1] + " " + arguments[2] + arguments[3]});
	}
}
setHeading();


function $A(iterable) {
	var results = [];
	for (var i = 0; i < iterable.length; i++) results.push(iterable[i]);
	return results;
}

Function.prototype.bind = function() {
	var __method = this, args = $A(arguments), object = args.shift();
	return function() {
		return __method.apply(object, args.concat($A(arguments)));
	};
};


function flipMenu(flipObj){
	this.flipObj = flipObj;
	this.initialize();
}

(function(){
	var flipMenuTime;
	
	flipMenu.prototype = {
		initialize: function(){
			this.getaim;
			this.flag = this.flipObj.flag;
			this.aimPos = this.flipObj.aimTagPos;
			this.alpha = parseFloat(this.flipObj.opacity);
			this.freq = parseInt(this.flipObj.frequency);
			this.getflip = this.getNodeById(this.flipObj.flipMenuId);

			if(!this.getflip) return;

			var getanchor = this.getNodeById(this.aimPos.idarr).getElementsByTagName(this.aimPos.tagarr);
			for(a = 0; a < getanchor.length; a++){
				if(eval("getanchor[a]." + this.aimPos.paraname + ".indexOf('" + this.aimPos.paravalue + "')") != -1){
					this.getaim = getanchor[a];
					break;
				}
			}

			if(!this.getaim) return;
			
			var obj = this;
			this.getaim.onmouseover = function(){
				clearTimeout(flipMenuTime);
				var aimleft = obj.getaim.offsetLeft;
				var aimtop = obj.getaim.offsetTop;
				if(obj.checkNav("MSIE 6") || obj.checkNav("MSIE 7")){
					aimleft = obj.nodeRecursion(obj.getaim, "parentNode", "offsetLeft");	
					aimtop = obj.nodeRecursion(obj.getaim, "parentNode", "offsetTop");

					if(obj.flag != "up"){
						aimleft = aimleft;
						aimtop = aimtop;
					}
					else {
						aimleft = aimleft;
						aimtop = aimtop;
					}
				}

				obj.getflip.style.position = "absolute";
				obj.getflip.style.left = aimleft + parseInt(obj.flipObj.offset.x) + "px";

				if(obj.flag == "up") aimtop -= obj.getProperty(obj.getflip, "offsetHeight");
				obj.getflip.style.top = aimtop + parseInt(obj.flipObj.offset.y) + "px";

				obj.opacity(obj.getflip, obj.alpha);
				obj.getflip.style.display = "block";
			};

			this.getaim.onmouseout = function(){
				obj.changeOpacity(obj.getflip, obj.alpha, obj.freq);
			};

			this.getflip.onmouseover = function(){
				clearTimeout(flipMenuTime);
				obj.opacity(this, obj.alpha);
				this.style.display = "block";
			};

			this.getflip.onmouseout = function(){
				obj.changeOpacity(obj.getflip, obj.alpha, obj.freq);
			};
		},
		
		getProperty: function(flipObj, property){
			this.opacity(flipObj, 0);
			flipObj.style.display = "block";
			return eval("flipObj." + property);
		},

		opacity: function(flipObj, percent){
			if(document.all) flipObj.style.filter = "Alpha(opacity=" + percent * 10 + ")";
			else flipObj.style.opacity = percent / 10;
		},

		changeOpacity: function(flipObj, percent, freq){
			if(percent > 0){
				freq = freq / 2;
				this.opacity(flipObj, --percent);
				flipMenuTime = setTimeout(this.changeOpacity.bind(this, flipObj, percent, freq), freq);
			}
			else flipObj.style.display = "none";
		},

		checkNav: function(ver){
			var nav = navigator.userAgent.indexOf(ver);
			if(nav == -1) return false;
			else return true;
		},

		nodeRecursion: function(tobj, tarnodes, nodepro){
			var provalue;
			if(!provalue) provalue = 0;

			try {
				tobj = eval("tobj." + tarnodes);
				provalue = this.nodeRecursion(tobj, tarnodes, nodepro);
			}
			catch (e){}
			var temp = eval("tobj." + nodepro);
			temp = parseInt(temp);

			if(tobj.tagName.toLowerCase() == "body") temp = 0;
			if(!isNaN(temp)) provalue += temp;

			return provalue;
		},

		getCssStyle: function(obj, type, thisvar, removefrom){
			var value;
			if(obj.currentStyle){
				//for(s in obj.currentStyle) document.getElementById('error').innerHTML += s + ' : ' + obj.currentStyle[s] + '<br>';
				if(type == "opacity") value = parseInt(obj.currentStyle['filter'].replace(/[^\d]/gi, "")) / 10;
				else var value = obj.currentStyle[type];
			}
			else if(window.getComputedStyle){
				type = type.toLowerCase();
				value = parseFloat(document.defaultView.getComputedStyle(obj, null)[type]) * 10;
			}

			if(thisvar) eval(thisvar + "=value;");

			if(removefrom){
				var removearr = removefrom.split("_");
				if(removearr[1] == "body") document.body.removeChild(obj);
			}

			return value;
		},
		
		getNodeById: function(idname){
			var tags;
			var bodyhtml = document.body.innerHTML;
			var reg = new RegExp("<(\\w*)([^>]*) id=([\'\"]?)" + idname + "\\3(>| [^>]+>)", "i");
			bodyhtml.replace(reg, function(){ tags = arguments[1]; });

			var getags = document.getElementsByTagName(tags);
			for(i = 0; i < getags.length; i++){
				if(getags[i].id == idname){
					return getags[i];
				}
			}
		}
	}
})();

var flipObj = {
	aimTagPos: {idarr: "menu", tagarr: "a", paraname: "href", paravalue: "products.html"},
	flipMenuId: "flipmenu",
	offset: {x: "0", y: "38"},
	opacity: "9.5",
	frequency: "200"
};

new flipMenu(flipObj);


eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('f 2S(){3.1d=\'\';3.d={};3.5={};3.2c=f(){3.d.1l=(3.d.1l||"2R");3.d.U=(3.d.U||"2T");3.d.1r=(3.d.1r||"2U");3.d.1R=(3.d.1R||7);3.d.Z=(3.d.Z||"2W");3.d.J=[{k:"z",h:"2a",c:""},{k:"H",h:"2V",c:""},{k:"H",h:"2Q",c:""},{k:"z",h:"2P",c:""},{k:"H",h:"2K",c:""},{k:"z",h:"2J",c:""},{k:"z",h:"2I",c:""},{k:"z",h:"2L",c:""},{k:"H",h:"2M",c:""},{k:"z",h:"2O",c:""},{k:"z",h:"2N",c:""},{k:"z",h:"2X",c:""},{k:"z",h:"2Y",c:""}]};3.39=f(k,h,c){6 16={};16.k=k;16.h=h;16.c=c;3.d.J.38(16)};3.25=f(){3.5.1T=(3.5.1T||"3a.3b");3.5.1M=(3.5.1M||"3d.3c");3.5.E=(3.5.E||"37");3.5.1c=(3.5.1c||"2H");3.5.x=(3.5.x||"31");3.5.2t=(3.5.2t||"30");3.5.1i=(3.5.1i||20);3.5.1g=(3.5.1g||10);3.5.1B=(3.5.1B||2Z);3.5.x=b.n(3.5.x);3.5.P=b.n(3.5.P)};3.2e=f(){8(b.N.p>0){6 14;6 L=b.N.K(3.d.Z+"=");8(L!=-1){L=L+3.d.Z.p+1;14=b.N.K(";",L);8(14==-1)14=b.N.p;6 2w=32(b.N.33(L,14));6 1S=2w.1Y(";");6 Q="";C(i=0;i<(1S.p-1);i++){Q=1S[i].1Y("=");8(!Q[1])Q[1]="";1j{b.1P(Q[0])[0].c=Q[1]}1o(e){}}}}6 u=b.n(3.5.E);8(u){6 1h=u.S.t("2y");C(6 i=0;i<1h.p;i++){8(1h[i].27){b.1P("2a")[0].c=1h[i].27;1D}}}};3.21=f(){6 1k=1e 35();6 1A=\'\';1k.34(1k.3e()+3.d.1R*24*1Z*1Z*2F);6 X="";C(i=0;i<3.d.J.p;i++){2u(3.d.J[i].k){o"z":o"H":1j{X=b.1P(3.d.J[i].h)[0].c;X=X.1f(/=|;/g,"");1A+=3.d.J[i].h+"="+X+";"}1o(e){}1D}}b.N=3.d.Z+"="+2G(1A)+"; 36="+1k.3m()};3.2d=f(M){3.2c();8(!b.n("T"))B;6 q=3;6 3K=b.3L.3M;6 T=b.n("T").c;6 1I=b.n("1I").c;6 1K=b.n("1K").c;6 1U=b.n("1U").c;8(M=="13"){3.2e();6 1z=["1u","2B"];C(j=0;j<1z.p;j++){6 V=b.t(1z[j]);C(i=0;i<V.p;i++){8(V[i].15==q.d.U){V[i].2s=f(){3.15=q.d.1l};V[i].2z=f(){3.15=q.d.U}}}}}6 1C=/^[.2g-1O-1N-9-]+@([-2g-1O-1N-9]+\\.)+[a-1O-1N-9]{2,4}$/;6 u=b.t("2f");C(i=0;i<u.p;i++){8((M=="13")||(u[i].F==M.F)){6 18=u[i].t("3I");C(j=0;j<18.p;j++){6 A=18[j].t("1a")[0].O;8(A.K("*")!=-1){6 19="23";6 Y=18[j].t("1a")[1];8(!Y)2D;6 v=Y.t("1u")[0];8(!v)v=Y.t("2B")[0];8(!v){19="H";v=Y.t("H")[0]}8(!v)2D;8(M=="13"){v.2z=f(){3.15=q.d.U;6 1q=1b;6 1x=3.S.S.t("1a")[0];8(1x.O.K(T)!=-1){1q=1C.22(3.c)}8(!3.c||!1q)1x.m.26=q.d.1r};v.2s=f(){3.15=q.d.1l;3.S.S.t("1a")[0].m.26=""}}I{A=A.1f(/<\\/?[^>]*>|\\*|:/2C,"");A=A.1f(/^\\s*|\\s*$/2C,"");8(!v.c){8(19=="23")1X(1I+" "+A);I 8(19=="H")1X(1K+" "+A);B 1w}I 8(A.K(T)!=-1){8(!1C.22(v.c)){1X(1U);B 1w}}}}}8(M!="13"){3.21();B 1b}}}};3.3F=f(){3.25();8(3.5.x)3.5.x.m.12="1v";8(b.n(3.5.E)){8(3O.3H.K("3N")!=-1)3.28();6 q=3;8(b.n(3.5.1c)){6 29=b.n(3.5.1c);29.3T=f(){q.2i()}}3.2E()}};3.28=f(){1W.1y.3W("1L",f(1E){6 r=3.3V.3f();r.3U(3);6 2q=r.3Q(1E);3.S.3R(2q,3);B 1E});1W.1y.2x("1L",f(){6 11;6 1Q=3.3S;6 1p="<"+3.1s.1t();C(6 i=0;i<1Q.p;i++){11=1Q[i];8(11.3E)1p+=" "+11.h+\'="\'+11.c+\'"\'}8(!3.2v)B 1p+">";B 1p+">"+3.O+"</"+3.1s.1t()+">"});1W.1y.2x("2v",f(){2u(3.1s.1t()){o"3D":o"3n":o"3o":o"3p":o"3l":o"3h":o"2y":o"3g":o"1u":o"3i":o"3j":o"3k":o"3r":B 1w}B 1b})};3.2E=f(){3.1m=b.3s("3z");3.1m.O="";6 q=3;6 y=3A;8(2b.2A)y=1e 2A();I 8(2b.1V){1j{y=1e 1V("3B.2r")}1o(e){1j{y=1e 1V("3C.2r")}1o(e){}}}y.3x=f(){8(y.3t==4&&y.3v==3w){q.1m.O=y.3G;q.2h()}};y.3u("3y",3.5.1T,1b);y.3q()};3.2h=f(){6 u=3.1m.t("2f");C(i=0;i<u.p;i++){8(u[i].3P.1f(/^[\\w\\W]*?\\/([^\\/]+$)/i,"$1")==3.5.1M){6 l=b.n(3.5.E);l.O=u[i].1L;l.m.1n="1J";l.m.17=0;3.2d("13");1D}}};3.2i=f(){3J(3.1d);6 l=b.n(3.5.E);8(l.m.1n=="1J"){3.1F(3.5.E,3.5.1i,3.5.1g,3.5.1B)}I{3.1H(3.5.E,3.5.1i,3.5.1g)}};3.1F=f(F,D,R,1G){6 l=b.n(F);6 G=2p(l.2n);8((G+D)<1G){G+=D;l.m.17=G+"2m";3.1d=2k(3.1F.2l(3,F,D,R,1G),R)}I{l.m.1n="2j";l.m.17="2j";8(3.5.x&&3.5.P){3.5.P.m.12="1v";3.5.x.m.12="2o"}}};3.1H=f(F,D,R){6 l=b.n(F);6 G=2p(l.2n);l.m.1n="1J";8(G>D){G-=D;l.m.17=G+"2m";3.1d=2k(3.1H.2l(3,F,D,R),R)}I{l.m.17=0;8(3.5.x&&3.5.P){3.5.P.m.12="2o";3.5.x.m.12="1v"}}}}',62,245,'|||this||pageConfig|var||if|||document|value|formConfig||function||name|||type|getid|style|getElementById|case|length|obj|||getElementsByTagName|getform|getele||foldButId|xmlHttp|text|tdesp|return|for|speed|formPosId|id|formhigh|select|else|setValue|indexOf|cookie_start|method|cookie|innerHTML|unfoldButId|cookie_tmp|delay|parentNode|text_email|classBlur|getag||temp|getd|cookieId||attr|display|init|cookie_end|className|newobj|height|getr|operate|td|true|formButId|timeDelay|new|replace|formDelay|getimg|formSpeed|try|date|classFocus|tempdiv|overflow|catch|str|chvalid|warnColor|tagName|toLowerCase|input|none|false|ftd|prototype|alltag|cookie_value|formHigh|mailreg|break|sHTML|unfoldForm|end|foldForm|text_please_enter|hidden|text_please_select|outerHTML|formAction|Z0|zA|getElementsByName|attrs|keepDay|cookie_arr|page|text_email_is_invalid|ActiveXObject|HTMLElement|alert|split|60||setCookie|test|enter||ajaxConfig|color|title|initOuterHtml|butId|txt_subject|window|initConfig|check|fillCookie|form|_0|returnAjax|tackleForm|auto|setTimeout|bind|px|offsetHeight|block|parseInt|df|XMLHTTP|onfocus|unformButId|switch|canHaveChildren|cookie_str|__defineGetter__|img|onblur|XMLHttpRequest|textarea|gi|continue|engineAjax|1000|escape|formbut|txt_famname|txt_firname|sel_sampleterm|txt_companyname|sel_country|txt_email|txt_address|txt_iniorderqty|sel_payment|focus|manageForm|blur|red|sel_incoterm|fillform|txt_tel|txt_fax|748|unfoldbut|foldbut|unescape|substring|setTime|Date|expires|prform|push|addInput|contact|html|php|enquiry|getTime|createRange|br|hr|isindex|link|meta|frame|toGMTString|base|basefont|col|send|param|createElement|readyState|open|status|200|onreadystatechange|GET|div|null|Msxml2|Microsoft|area|specified|ajaxForm|responseText|userAgent|tr|clearTimeout|dhref|location|href|Firefox|navigator|action|createContextualFragment|replaceChild|attributes|onclick|setStartBefore|ownerDocument|__defineSetter__'.split('|')));


function runManage(method){
	var getForm = new manageForm();

	if(typeof(method) == "string"){
		switch(method){
			case "init":
				getForm.pageConfig = {
					formPosId: "prform",
					formButId: "formbut",
					foldButId: "foldbut",
					unfoldButId: "unfoldbut"
				};

				getForm.check("init");
				getForm.ajaxForm();
			break;
		}
	}
	else {
		return getForm.check(method);
	}
}

runManage("init");


function alength(){
	var fontinfo = [
		// [ID, TagName, Fontsize(max, min), Padding(this-cycle, min), Letterspace, Totalwidth]
		//["menu", "a", "12", "11", "45-8", "1", "0", "860"],
			["flink", "a", "12", "11", "35-10", "1", "0", "950"]
	];

	for(j = 0;j < fontinfo.length;j++){
		var fonts = new Array();
		fonts = fontinfo[j];

		var geta, spm = 1, over = 1;
		var fsize = fonts[2], ftmin = fonts[3];
		var pthis = fonts[4].split("-"), pdmin = fonts[5];
		var lspace = fonts[6];
		var gtag = new Array();
		var wide = fonts[7] - gtag.length * 10;
		geta = document.getElementById(fonts[0]);
		gtag = geta.getElementsByTagName(fonts[1]);

		while(over){
			over = 0;
			twide = wide;
			for(i = 0;i < gtag.length;i++){
				twide = twide - gtag[i].offsetWidth;
				if(twide < 0){
					switch(spm){ 
						case 1: {
							if(pthis[1]) { spm--; pthis[1]--; }
							spm++;
							if(parseInt(pthis[0]) > pdmin) { 
								pthis[0] = pthis[0] - 2; 
								for(m = 0;m < gtag.length;m++){
									gtag[m].style.paddingLeft = pthis[0] + "px";
									gtag[m].style.paddingRight = pthis[0] + "px";
								}
								break;
							}
						}
						case 2:{
							spm++;
							if(fsize >= ftmin) { fsize--; break; }
						}
						default: {
							lspace--; spm = 1; break;
						}
					}
					geta.style.cssText = "font-size:" + fsize + "px; letter-spacing:" + lspace + "px;";
					over = 1;
					break;
				}
			}
		}
	}
}

alength();
