function GetXmlHttpObject(handler)
{
var objXmlHttp=null;
objXmlHttp=new XMLHttpRequest();
objXmlHttp.onreadystatechange=handler;
return objXmlHttp;
}
var xmlHttp
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")
} catch (e) {
try {
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")
} catch (E) {
xmlHttp=false
}
}
@else
xmlHttp=false
@end @*/
if (!xmlHttp) {
try {
xmlHttp = new XMLHttpRequest();
}
catch (e) {
xmlHttp=false
}
}
function toggleFaq(id) {
if(document.getElementById(id).style.display == 'none') {
document.getElementById(id).style.display = '';
} else {
document.getElementById(id).style.display = 'none';
}
}
function countdown()
{
document.write('\n');
}
function tp_popup(url) {
fenster = window.open(url, "", "width=865,height=470,status=yes,scrollbars=yes,resizable=yes");
fenster.focus();
}
function winopen(theURL, Name, popW, popH, scroll) {
var winleft = (screen.width - popW) / 2;
var winUp = (screen.height - popH) / 2;
winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',resizable='+scroll
Win = window.open(theURL, Name, winProp)
}
function slidelink(){
if
(whichimage==1)
window.open('http://www.saqrport.com')
else if
(whichimage==2)
window.open('http://www.saqrport.com')
else if
(whichimage==3)
window.open('http://www.saqrport.com')
else if
(whichimage==4)
window.open('http://www.adidas.com')
else if
(whichimage==5)
window.open('http://www.adidas.com')
else if
(whichimage==6)
window.open('http://www.adidas.com')
else if
(whichimage==7)
window.open('http://www.premiertiming.com')
else if
(whichimage==8)
window.open('http://www.premiertiming.com')
else if
(whichimage==9)
window.open('http://www.premiertiming.com')
else if
(whichimage==10)
window.open('http://www.alainwater.com')
else if
(whichimage==11)
window.open('http://www.alainwater.com')
else if
(whichimage==12)
window.open('http://www.alainwater.com')
else if
(whichimage==13)
window.open('http://www.capri-sun.ae')
else if
(whichimage==14)
window.open('http://www.capri-sun.ae')
else if
(whichimage==15)
window.open('http://www.capri-sun.ae')
else if
(whichimage==16)
window.open('http://www.rakhospital.com')
else if
(whichimage==17)
window.open('http://www.rakhospital.com')
else if
(whichimage==18)
window.open('http://www.rakhospital.com')
else if
(whichimage==19)
window.open('http://www.ups.com')
else if
(whichimage==20)
window.open('http://www.ups.com')
else if
(whichimage==21)
window.open('http://www.ups.com')
}
function countdownRegTime() {
var end = new Date('January 31, 2012 23:59:00');
function toSt2(n) {
s = '';
if (n < 10) s += '0';
return (s + n).toString();
}
function toSt3(n) {
s = '';
if (n < 10) s += '00';
else if (n < 100) s += '0';
return (s + n).toString();
}
d = new Date();
count = Math.floor(end.getTime() - d.getTime());
if(count > 0) {
miliseconds = toSt3(count%1000); count = Math.floor(count/1000);
seconds = toSt2(count%60); count = Math.floor(count/60);
minutes = toSt2(count%60); count = Math.floor(count/60);
hours = toSt2(count%24); count = Math.floor(count/24);
days = count;
document.getElementById('c1').innerHTML = days;
document.getElementById('c2').innerHTML = hours;
document.getElementById('c3').innerHTML = minutes;
document.getElementById('c4').innerHTML = seconds;
setTimeout('countdownRegTime()', 100);
}
}
function initialCap(mystring) {
var sp = mystring.value.split(' ');
var wl=0;
var f ,r;
var word = new Array();
for (i = 0 ; i < sp.length ; i ++ ) {
f = sp[i].substring(0,1).toUpperCase();
r = sp[i].substring(1);
word[i] = f+r;
}
newstring = word.join(' ');
mystring.value = newstring;
}
function Fadein(id, geschwindigkeit) {
var fps = Math.round(geschwindigkeit / 100);
var tmp = 0;
for(i = 0; i <= 100; i++) {
setTimeout("Fadeint_fade('" + id + "'," + i + ")", (tmp * fps));
tmp++;
}
}
function Fadeint_fade(id, pas) {
var thediv = document.getElementById(id).style;
if(pas > 0) {
thediv.opacity = (pas / 100);
thediv.MozOpacity = (pas / 100);
thediv.KhtmlOpacity = (pas / 100);
thediv.filter = "alpha(opacity=" + pas + ")";
} else {
thediv.display = "table-row";
}
}
function Fadeout(id, geschwindigkeit) {
var fps = Math.round(geschwindigkeit / 100);
var tmp = 0;
for(i = 100; i >= 0; i--) {
setTimeout("Fadeout_fade('" + id + "'," + i + ")", (tmp * fps));
tmp++;
}
}
function Fadeout_fade(id, pas) {
var thediv = document.getElementById(id).style;
if(pas > 0) {
thediv.opacity = (pas / 100);
thediv.MozOpacity = (pas / 100);
thediv.KhtmlOpacity = (pas / 100);
thediv.filter = "alpha(opacity=" + pas + ")";
} else {
thediv.display = "none";
}
}
function toggleDivBlock(id) {
if(document.getElementById(id).style.display == 'none') { FadeinBlock(id,280); } else { Fadeout(id,280); }
}
function FadeinBlock(id, geschwindigkeit) {
var fps = Math.round(geschwindigkeit / 100);
var tmp = 0;
for(i = 0; i <= 100; i++) {
setTimeout("Fadeint_fadeBlock('" + id + "'," + i + ")", (tmp * fps));
tmp++;
}
}
function Fadeint_fadeBlock(id, pas) {
var thediv = document.getElementById(id).style;
if(pas > 0) {
thediv.opacity = (pas / 100);
thediv.MozOpacity = (pas / 100);
thediv.KhtmlOpacity = (pas / 100);
thediv.filter = "alpha(opacity=" + pas + ")";
} else {
thediv.display = "block";
}
}
function numericVal(obj) {
var tam = obj.value.length;
var numeric = false;
for(var i=0;i= 40 && caracter <= 57) || caracter == 32)
numeric = true;
else
{
obj.value=obj.value.substring(0,tam-1);
numericVal(obj);
}
}
}
function numericValNumbersOnly(obj) {
var tam = obj.value.length;
var numeric = false;
for(var i=0;i= 48 && caracter <= 57)
numeric = true;
else
{
obj.value=obj.value.substring(0,tam-1);
numericVal(obj);
}
}
}
function prot() {
alert('We believe we charge a fair price for a legitimate download. Please purchase your photo selection.');
}
function sgetHelpLiveQuestions(str)
{
document.getElementById('livesearch_help').style.display='block';
if (str.length==0)
{
document.getElementById('livesearch_help').innerHTML="";
document.getElementById('livesearch_help').style.border="1px";
return;
}
xmlhttp=GetXmlHttpObject()
if (xmlhttp==null)
{
alert ("Your browser does not support XML HTTP Request");
return;
}
var url= "http://www.rakmarathon.org/action/help_live_search.php";
url=url+"?q="+str;
xmlhttp.onreadystatechange=stateChangedHelp;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function stateChangedHelp(type)
{
if (xmlhttp.readyState==4)
{
document.getElementById('livesearch_help').innerHTML=xmlhttp.responseText;
document.getElementById('livesearch_help').style.border="1px solid #ccc";
document.getElementById('livesearch_help').style.borderTop="0";
if(xmlhttp.responseText == '') {
document.getElementById("livesearch_help").style.border="0px";
}
}
}
function hideResultsHelp() {
document.getElementById('livesearch_help').style.display='none';
}
function addQuestionVote(question_id, vote) {
xmlMessage = '';
var url = 'http://www.rakmarathon.org/action/vote_helptext.php?q=' + question_id + '&v=' + vote;
xmlHttp.open("POST", url, false);
xmlHttp.setRequestHeader('Content-Type','text/html');
xmlHttp.send(xmlMessage);
document.getElementById('vote_response' + question_id).style.display = 'none';
document.getElementById('vote_response' + question_id).innerHTML = "
Thank you for your feedback!";
Fadein('vote_response' + question_id,450);
document.getElementById('vote_selection' + question_id).style.display = 'none';
}
function iconPlus(id) {
if(document.getElementById('plus' + id).src == 'http://www.rakmarathon.org/layout/images/icon-minus.gif') {
document.getElementById('plus' + id).src = 'http://www.rakmarathon.org/layout/images/icon-plus.gif';
} else {
document.getElementById('plus' + id).src = 'http://www.rakmarathon.org/layout/images/icon-minus.gif';
}
}