/*
############################################################
* Origin: www.voiptalk.org
* Name: snvajax.js
* Description AJAX implementation for website
* Version: 0.6
* Modified: 16:00 10/10/2007
* Copyright: Telappliant Ltd.
############################################################
*/
var xmlHttp
function showrq(str,prodid)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
}
if (str.length > 1) {
var url="search_number.php"
url=url+"?q="+str+"&products_id="+prodid+"&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("snumrq").innerHTML='
'
}
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("snumrq").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 (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
}
var flashTimer = null;
var flashState = flashCount = 0;
function getCheckedValue(radioObj) {
if(!radioObj)
return "";
var radioLength = radioObj.length;
if(radioLength == undefined)
if(radioObj.checked)
return radioObj.title;
else
return "";
for(var i = 0; i < radioLength; i++) {
if(radioObj[i].checked) {
return radioObj[i].title;
}
}
return "";
}
function checkDataCancel()
{
$('destinations_confirmation').fade('out');
newdiv = document.getElementById('destinations_confirmation');
setTimeout("document.getElementById('services_product').removeChild(newdiv)", 600);
}
function checkData( destinations )
{
if ( !document.getElementById("check") )
{
return false;
} else if ( document.getElementById("check").value == "invalid" ) {
flash("number");
return false;
}
if ( destinations )
{
var destination_name = getCheckedValue( document.forms['cart_quantity'].elements['id[9]'] );
if ( destinations.search( destination_name ) < 0 ) return true; else {
var newdiv = document.createElement('div');
newdiv.setAttribute('id', 'destinations_confirmation');
newdiv.innerHTML = 'IMPORTANT INFORMATION!
Legal restrictions apply in these countries:
• France
• Germany
• Holland
• Hungary
• Ireland
• Norway
• Singapore
Therefore, in order for us to proceed with your order, we require you to send us some form of address verification.
Any incoming numbers from France, Germany, Holland, Hungary and Ireland will require local proof of address.
This can be any official document stating a valid address within the chosen area, which we can "Link" the number to.
Norway numbers require valid proof of address from any part of Norway.
If you require an incoming number from within Singapore please provide an official document with valid proof of address from anywhere in the world.
If you are unable, or are unwilling to provide the required documentation within 5 working days we will cancel the order and process a refund.
Please submit valid proof of address with your order number to the customerservices@telappliant.com.
If you have any queries please email the customer services team or call 0845 557 6100.
In order to proceed with your purchase select CONTINUE button, or to cancel select BACK.


';
document.getElementById('services_product').appendChild(newdiv);
$('destinations_confirmation').fade('hide');
setTimeout("document.getElementById('destinations_confirmation').style.display = 'block'", 10);
setTimeout("$('destinations_confirmation').fade('in')", 20);
return false;
}
}
return true;
}
function flash(fname)
{
if(flashState == 1)
{
document.getElementById(fname).style.backgroundColor = "#fff";
flashState = 0;
}
else
{
document.getElementById(fname).style.backgroundColor = "#cee885";
flashState = 1;
}
if(flashCount == 5)
{
document.getElementById(fname).focus();
clearTimeout(flashTimer);
flashCount = flashState = 0;
}
else
{
flashTimer = setTimeout("flash('"+fname+"')",100);
flashCount++;
}
}
function swaptext() {
if (document.getElementById('number').value == "Type in here the city name or prefix") document.getElementById('number').value = '';
}