﻿// JScript 文件


//商机通帐号设置
jstx_DivWidth		= parseInt("109");
jstx_DivHeight	= parseInt("100");
jstx_iRight = 5;
jstx_MinRight=830;
jstx_iTop = 150;
jstx_iTimeout = 50;
var __bs__ = navigator.userAgent.indexOf("MSIE") > 0 ?
	"MSIE" : navigator.userAgent.indexOf("Safari") > 0 ?
	"Safari" : "others";
var __dt__ = (document.documentElement.clientHeight > 0) &&
	(__bs__ == "MSIE" || document.body.clientHeight > document.documentElement.clientHeight) ?
	"W3C" : "undefined";
function MK_pageY() {
	if (__bs__ == "MSIE") {
		if (__dt__ == "W3C")
			return document.documentElement.scrollTop;
		else
			return document.body.scrollTop;
	} else {
		return window.pageYOffset;
	}
}
function MK_pageX() {
	if (__bs__ == "MSIE") {
		if (__dt__ == "W3C")
			return document.documentElement.scrollLeft;
		else
			return document.body.scrollLeft;
	} else {
		return window.pageXOffset;
	}
}
function MK_pageH() {
	if (__bs__ == "Safari")
		return window.innerHeight;
	else if (__dt__ == "W3C")
		return document.documentElement.clientHeight;
	else
		return document.body.clientHeight;
}
function MK_pageW() {
	if (__bs__ == "Safari")
		return window.innerWidth;
	else if (__dt__ == "W3C")
		return document.documentElement.clientWidth;
	else
		return document.body.clientWidth;
}
function MK_posY(o, v) {
	if (!o || !o.style) return ;
	if (v) {
		o.style.top = parseInt(v) + "px";
	} else {
		return o.style.top;
	}
}
function MK_posX(o, v) {
	if (!o || !o.style) return ;
	if (v) {
		o.style.left = parseInt(v) + "px";
	} else {
		return o.style.left;
	}
}
function atoi(s) {
	var r = parseInt(s);
	return isNaN(r) ? 0 : r;
}
function magic_locus(x1, x2, n) {
	x1 = atoi(x1);
	x2 = atoi(x2);
	n = atoi(n);
	var d = Math.abs(x1 - x2);
	if (d < n) return magic_locus(x1, x2, d / 2);
	return n <= 1 ? x1 : (x1 + (n-1) * x2) / n ;
}
function sjt_onlick()
{
var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=f4f4568ecbcc15ead8a0e44126f4b957ff67a99556648ed37a3ab956cc05b35f';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;
}
function sjt_content()
{
   temp="<div id='divStayTopleft' style='position: absolute;'> <table width='87' border='0' cellspacing='0'cellpadding='0'><tr><td><img src='images/close.gif' width='87' height='15' onclick='javascript:closeqq()' /></td></tr><tr>  <td><img src='images/kf_top.gif' width='87' height='24'></td></tr> <tr> <td height='28' align='center' background='images/kf_bj.gif'><a href='http://sighttp.qq.com/cgi-bin/check?sigkey=fed84f746353e22c745df3e09f9c7052288e584e5ea3ae02c2e3a7c3de2b385fba240cf145e1ebeb1b286df2fb720fea4f1607f53e864315dd42513165d5b73530c3b4539c7ff518'; target=_blank; onclick='var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=fed84f746353e22c745df3e09f9c7052288e584e5ea3ae02c2e3a7c3de2b385fba240cf145e1ebeb1b286df2fb720fea4f1607f53e864315dd42513165d5b73530c3b4539c7ff518';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;'><img border='0' SRC='images/qq_c.gif' alt='QQ' width='64' height='18' border='0' alt='QQ客服'></a><tr><td height='28' align='center' background='images/kf_bj.gif'><a href='http://sighttp.qq.com/cgi-bin/check?sigkey=02157a41027eaeb7e542a9c7cf26e97aab062c65ca5bf027a8de61ae3acdd22f78ae1e1d4e8c4db16df970b17b8bc0d5729ebfb5c101323bbe49f5b31bda503afffb3e8c4d9db47e'; target=_blank; onclick='var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=02157a41027eaeb7e542a9c7cf26e97aab062c65ca5bf027a8de61ae3acdd22f78ae1e1d4e8c4db16df970b17b8bc0d5729ebfb5c101323bbe49f5b31bda503afffb3e8c4d9db47e';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;'><img SRC='images/qq_c.gif' alt='QQ' width='64' height='18' border='0' alt='QQ客服'></a></td><tr><td height='28' align='center' background='images/kf_bj.gif'><a href='http://sighttp.qq.com/cgi-bin/check?sigkey=33e9e9384aabf3051c99bf5c9be897f8736b1743cc4809e7ee64da5f2064faa0c4f5d37720f48ddc44d80ab962d0037ef33e558f0a602ac45776ab3d69a94fdbfff9448188fa8dbd'; target=_blank; onclick='var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=33e9e9384aabf3051c99bf5c9be897f8736b1743cc4809e7ee64da5f2064faa0c4f5d37720f48ddc44d80ab962d0037ef33e558f0a602ac45776ab3d69a94fdbfff9448188fa8dbd';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;'><img SRC='images/qq_c.gif' alt='QQ' width='64' height='18' border='0' alt='QQ客服'></a></td> </tr> <tr><td height='28' align='center' background='images/kf_bj.gif'><a href='msnim:chat?contact=a457027734@126.com' target='_blank'><img src='images/msn_c.gif' width='64' height='18'  border='0' /></a></td></tr><tr><td height='28' align='center' background='images/kf_bj.gif'><a href='msnim:chat?contact=szjietronics@hotmaill.com' target='_blank'><img src='images/msn_c.gif' width='64' height='18'  border='0' /></a></td></tr> <tr><td><img src='images/kf_bottom.gif' width='87' height='3'></td> </tr> </table></div>";
   return temp;
}
function jstx_Load() {
	var style_class = 'style="position: absolute; width:' +jstx_DivWidth + 'px; height:'+ jstx_DivHeight + 'px"';
	var _temp = '<div id="jstx_Div" ' + style_class + '>' +
		'$js_sjt_content$ </div>';
	var _con = sjt_content();
	var _str = _temp.replace(/\$js_sjt_content\$/gi, _con);
	document.writeln(_str);
	setInterval("jstx_Move();", jstx_iTimeout);
}
function jstx_Move() {
	try {
		var _div = document.getElementById('jstx_Div');
		
		var _left = MK_pageW() - jstx_iRight - jstx_DivWidth;
		if (_left<jstx_MinRight)
		{
			_left=jstx_MinRight
		}
		var _top = MK_pageY() + jstx_iTop ;
		_top = magic_locus(_top, MK_posY(_div), 4);		
		MK_posY(_div, _top);
		MK_posX(_div, _left);
	} catch(e) {}
} 
jstx_Load();
function closeqq()  
{   
divStayTopleft.style.visibility="hidden"; 
divStayTopleft.style.visibility="hidden";
}