/* ############################################################ * Origin: www.voiptalk.org * Name: java.js * Description Main JavaScript file * Version: 1.0 * Modified: 12:00 22/05/2009 * Copyright: Telappliant Ltd. ############################################################ */ // CSS Browser Selector v0.4 - Rafael Lima (http://rafael.adm.br) function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('blackberry')?m+' blackberry':is('android')?m+' android':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?m+' j2me':is('iphone')?m+' iphone':is('ipod')?m+' ipod':is('ipad')?m+' ipad':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win'+(is('windows nt 6.0')?' vista':''):is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent); function clearbox(box,defaulttxt) { if(defaulttxt.toLowerCase() == box.value.toLowerCase()) { box.value = ""; } box.onblur = function() { unclearbox(box,defaulttxt);} } function unclearbox(box,defaulttxt) { if(box.value == "") { box.value = defaulttxt; } } function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150') } function MM_openBrWindow(theURL,winName,features) { window.open(theURL,winName,features); } function showtab(thisdiv) { if(document.getElementById(thisdiv).style.display=='none') document.getElementById(thisdiv).style.display='block'; if(thisdiv != 'overview') document.getElementById('overview').style.display='none'; if(thisdiv != 'features') document.getElementById('features').style.display='none'; if(thisdiv != 'supp') document.getElementById('supp').style.display='none'; if(thisdiv != 'reviews') document.getElementById('reviews').style.display='none'; if(thisdiv != 'cartad') document.getElementById('cartad').style.display='none'; } var newWin = null; function closeWin(){ if (newWin != null){ if(!newWin.closed) newWin.close(); } } function popUp(strURL,strType,strHeight,strWidth) { closeWin(); var strOptions=""; if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth; if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth; if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth; if (strType=="scrolled") strOptions="scrollbars,location,height="+strHeight+",width="+strWidth; newWin = window.open(strURL, 'newWin', strOptions); newWin.focus(); } function swapimage(imageid) { if (document.images) { button1 = new Image button2 = new Image button1.src = '/products/images/showsc.gif'; button2.src = '/products/images/hidesc.gif'; if (document.getElementById(imageid).src==button1.src) document.getElementById(imageid).src=button2.src; else document.getElementById(imageid).src=button1.src; } } function tooltiphide(idp) { window.setTimeout('document.getElementById(\'tooltip_'+idp+'\').innerHTML = \'\';',500); } var xmlHttp function tooltip(type,idp,dir) { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="/products/popup_content.php" url=url+"?type="+type+"&idp="+idp+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged; xmlHttp.open("GET",url,true); xmlHttp.send(null); function stateChanged() { if (xmlHttp.readyState==1 || xmlHttp.readyState=="complete") document.getElementById("tooltip_"+idp).innerHTML='
'; if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") document.getElementById("tooltip_"+idp).innerHTML=xmlHttp.responseText; } } function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { //Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (ee) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } function openlivechat() { var newWin = null; function closeWin(){ if (newWin != null){ if(!newWin.closed) newWin.close(); } } popUp('livechat.php','console','480','500'); } // Buttons roll-over effect function rolloverbtn(btn_id, btn_src) { document.getElementById(btn_id).src = btn_src; } // Switch tables function transition(from_id, to_id, from_txt, to_txt, btn_id) { if ( $(to_id).style.display == "none" ) { $(to_id).fade('hide'); setTimeout("$('" + to_id + "').style.display = \"block\";", 10); } setTimeout("$('" + from_id + "').style.display = \"none\";", 20); setTimeout("$('" + to_id + "').fade('in');", 30); $(btn_id).set('html', '' + to_txt + ''); $(btn_id).set('onclick', 'javascript:transition(\'' + to_id + '\',\'' + from_id + '\',\'' + to_txt + '\',\'' + from_txt + '\',\'' + btn_id + '\');'); }