// Call4Service Main
var SWF_Wx="";
var SWF_Hx="";
function FindMe()
{
return true;
}
function Call4ServFL_DoFSCommand(command, args)
{
var FLV_Target=args.substr(0,args.indexOf("|"));
var C4S_ARGE=args.substr((args.indexOf("|")+1));
//alert(FLV_Target+"_"+C4S_ARGE);
var txt;
if (command == "call_alert") {
alert("Here's the Flash message: " + args);
}
if (command != "alert") {
txt=command+"("+C4S_ARGE+")";
txt="window.document.Call4ServFL.SetVariable(\""+FLV_Target+"\", "+txt+")";
//alert(txt);
eval(txt);
}
}
function GiveMeVBS()
{
document.write("");
document.write("Sub Call4ServFL_FSCommand(ByVal command, ByVal args)");
document.write(" call Call4ServFL_DoFSCommand(command, args)");
document.write("end sub");
document.write("");
}
function DetectAX()
{
document.write("");
document.write("function DetectOBJ");
document.write(" On Error Resume Next");
document.write(" Set OBJ = CreateObject(\"ATL_SAMPLE.CAtlSampleObj.1\")");
document.write(" Set a = 0");
document.write(" If OBJ is Nothing Then");
document.write(" DetectOBJ=0");
document.write(" Else");
document.write(" DetectOBJ=OBJ.MajorVersion&chr(46)&snc.MinorVersion&chr(46)&snc.BuildVersion&chr(46)&snc.SubBuildVersion");
document.write(" Set OBJ = Nothing");
document.write(" End If");
document.write("end function");
document.write("");
}
function CheckVersion()
{
alert("document.Call4Serv.C4sCmd('ShowVersion','1, 0, 0, 10')");
return document.Call4Serv.C4sCmd("ShowVersion","1, 0, 0, 10");
}
function Call4Serv(ShowWhat)
{
//alert(ShowWhat);
var w=210;
var h=60;
var p='http://www.t2free.com/c4s_resource/Ntil10/ntil.cab#version=1,0,0,10';
if (ShowWhat)
{
w=0;
h=0;
//p='';
}
document.write("");
return true;
}
function MakeUpdate()
{
/*var note="
";
var x_me=0;
x_me=document.Call4Serv.ShowVersion();
if (x_me!='1, 0, 0, 10')
{
document.Call4Serv.width=210;
document.Call4Serv.height=60;
Call4MeDIV.innerHTML = note;
}*/
}
function WCall4FL()
{
var swf_w=210;
var swf_h=250;
var swfpath="c4s_resource/Call4Serv3.swf";
if (SWF_Wx>1)
{
swf_w=SWF_Wx;
swf_h=SWF_Hx;
}
document.write("");
//document.write("");
}
function RetNowTimePhp(St,Et,Esc)
{
var nowx='194118';
var noww='4';
//alert(St+"_"+nowx+"_"+Et+"_"+noww);
if (St<=nowx && Et>=nowx)
if (Esc.indexOf(noww)==-1)
return false;
else
return true;
else
return false;
}
//===============================================================================
var menuTopMargin = -100;
var menuLeftMargin = 165;
var menuSpeed = 15;
var timerSpeed = 200;
var timer;
var heightLimit = 0;
var bodyType="documentElement";
function checkMenu() {
if(document.body.offsetHeight > heightLimit) {
var reTimer = timerSpeed;
var startPoint = parseInt(document.all.Call4ServDIV.style.top,10);
var endPoint = document.documentElement.scrollTop;
var startPointW = parseInt(document.all.Call4ServDIV.style.left,10);
var endPointW = document.documentElement.clientWidth-menuLeftMargin;
if (bodyType=="body" || document.documentElement.clientWidth < 100)
{
endPoint = document.body.scrollTop;
endPointW = document.body.clientWidth-menuLeftMargin;
}
endPoint = (menuTopMargin <= endPoint ) ? endPoint - menuTopMargin : 0;
if(startPointW != endPointW) {
moveAmount = Math.ceil(Math.abs(endPointW - startPointW) / 15);
document.all.Call4ServDIV.style.left = startPointW + ((endPointW heightLimit) document.all.Call4ServDIV.style.top = 110;//document.body.scrollTop;
checkMenu();
}
//======================================================================
function detectLNG()
{
return 'zh-tw';
var BrowserLanguage='zh-tw';
//alert(window.navigator.userLanguage);
if (window.navigator.appName=="Microsoft Internet Explorer")
{
BrowserLanguage=window.navigator.userLanguage;
}else if (window.navigator.appName=="Netscape"){
BrowserLanguage=window.navigator.language
}
if (BrowserLanguage=="zh-tw" || BrowserLanguage=="en-us")
return BrowserLanguage;
else
return "en-us";
}
function SetDontUpdate()
{
StopUpdate=true;
}
function CheckLoad(IDNUpdate,IOHere)
{
if (StopUpdate==false)
{
setTimeout("document.Call4ServFL.Play()",1500);
if (CheckVersion()==true)
{
//alert('00');
IDNUpdate=true;
}
//alert(IDNUpdate+"_"+IOHere);
if (IOHere!=0 && IDNUpdate==false)
{
//alert('01');
setTimeout("setUpdateMe()",400);
}else{
//alert('02');
if (IOHere==0)
{
//alert('03');
setTimeout("setNoInstalled()",400);
}else{
//alert('04');
setTimeout("setDontUpdateMe()",200);
}
}
}
}
function GoGoCall(Num)
{
//document.Call4Serv.C4sCmd('NoteUp', ContentTitle);
//document.Call4Serv.C4sCmd('Note', Content);
//document.Call4Serv.C4sCmd('NoteDown', ContentStatus);
document.Call4ServFL.SetVariable("Call2Number",Num);
}
function Call(Num)
{
if (document.Call4Serv.C4sCmd('GetLoginState',''))
{
GoGoCall(Num);
}else{
alert('按下確認按鍵後將為您啟動網路自動撥號,請您稍待.');
GoGoCall(Num);
document.Call4ServFL.SetVariable("OUTCLICK",'GOGOGO');
}
}
function SendDTMFs(DTMFCODE)
{
for (var i=0;i