var mins
var secs;

function cd() {
 	mins = 1 * m(document.getElementById("minutes").value); // change minutes here
 	secs = 0 + s(":"+document.getElementById("seconds").value); // change seconds here (always add an additional second to your total)
 	redo();
}

function m(obj) {
 	for(var i = 0; i < obj.length; i++) {
  		if(obj.substring(i, i + 1) == ":")
  		break;
 	}
 	return(obj.substring(0, i));
}

function s(obj) {
 	for(var i = 0; i < obj.length; i++) {
  		if(obj.substring(i, i + 1) == ":")
  		break;
 	}
 	return(obj.substring(i + 1, obj.length));
}

function dis(mins,secs) {
 	var disp;
 	if(mins <= 9) {
  		disp = " 0";
 	} else {
  		disp = " ";
 	}
 	disp += mins + ":";
 	if(secs <= 9) {
  		disp += "0" + secs;
 	} else {
  		disp += secs;
 	}
 	return(disp);
}

function redo() {
 	secs--;
 	if(secs == -1) {
  		secs = 59;
  		mins--;
 	}
 	document.cd.disp.value = dis(mins,secs); // setup additional displays here.
 	
 		cd = setTimeout("redo()",1000);
 
}

function init1() {
  cd();
}
window.onload = init1;

function GetPageContent(PageName){
	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
                        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
    xmlhttp.open('GET','game.php?action=' + PageName, true); 
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3)
	document.getElementById('PageContent').innerHTML = '<p align="center"><img border="0" src="images/loading.gif"></p>';
        	if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                                if( content ){ 
                      document.getElementById('PageContent').innerHTML = content; 
                }
        }
        }
        xmlhttp.send(null) ;
        return;
}

function getPage(page){

	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
                        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
    
	var allyid = document.getElementById(page).value;
    xmlhttp.open('GET','get_ally_data.php?allyid=' + allyid  , true); 
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3)
	document.getElementById('Login').innerHTML = '<p align="center"><img border="0" src="images/loading.gif"></p>';
        	if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                                if( content ){ 
                      document.getElementById('ajax').innerHTML = content; 
                }
        }
        }
        xmlhttp.send(null) ;
        return;
}



function getPage2(){

	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
                        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
    
	var userid = document.getElementById('ajax_id').value;
    xmlhttp.open('GET','show_send_weapons.php?userid=' + userid  , true); 
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3)
	document.getElementById('ajax').innerHTML = '<p align="center"><img border="0" src="images/loading.gif"></p>';
        	if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                                if( content ){ 
                      document.getElementById('ajax').innerHTML = content; 
                }
        }
        }
        xmlhttp.send(null) ;
        return;
}


function getPage3(){

	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
                        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
    xmlhttp.open('GET','packages.php' , true); 
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3)
	document.getElementById('ajax1').innerHTML = '<p align="center"><img border="0" src="images/loading.gif"></p>';
        	if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                                if( content ){ 
                      document.getElementById('ajax1').innerHTML = content; 
                }
        }
        }
        xmlhttp.send(null) ;
        return;
}

function getPage4(){

	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
                        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
    xmlhttp.open('GET','sms.php' , true); 
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3)
	document.getElementById('ajax1').innerHTML = '<p align="center"><img border="0" src="images/loading.gif"></p>';
        	if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                                if( content ){ 
                      document.getElementById('ajax1').innerHTML = content; 
                }
        }
        }
        xmlhttp.send(null) ;
        return;
}


function getPage5(){

	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
                        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
    xmlhttp.open('GET','tech_paid.php' , true); 
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3)
	document.getElementById('ajax1').innerHTML = '<p align="center"><img border="0" src="images/loading.gif"></p>';
        	if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                                if( content ){ 
                      document.getElementById('ajax1').innerHTML = content; 
                }
        }
        }
        xmlhttp.send(null) ;
        return;
}

function getPage6(){

	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
                        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
    xmlhttp.open('GET','supporter.php' , true); 
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3)
	document.getElementById('ajax1').innerHTML = '<p align="center"><img border="0" src="images/loading.gif"></p>';
        	if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                                if( content ){ 
                      document.getElementById('ajax1').innerHTML = content; 
                }
        }
        }
        xmlhttp.send(null) ;
        return;
}

function getPage7(){

	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
                        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
    xmlhttp.open('GET','updat.php' , true); 
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3)
	document.getElementById('ajax1').innerHTML = '<p align="center"><img border="0" src="images/loading.gif"></p>';
        	if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                                if( content ){ 
                      document.getElementById('ajax1').innerHTML = content; 
                }
        }
        }
        xmlhttp.send(null) ;
        return;
}

function getPage8(){

	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
                        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
    xmlhttp.open('GET','sysms.php' , true); 
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3)
	document.getElementById('ajax1').innerHTML = '<p align="center"><img border="0" src="images/loading.gif"></p>';
        	if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                                if( content ){ 
                      document.getElementById('ajax1').innerHTML = content; 
                }
        }
        }
        xmlhttp.send(null) ;
        return;
}

function getPage9(){

	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
                        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
    xmlhttp.open('GET','marketn.php' , true); 
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3)
	document.getElementById('ajax1').innerHTML = '<p align="center"><img border="0" src="images/loading.gif"></p>';
        	if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                                if( content ){ 
                      document.getElementById('ajax1').innerHTML = content; 
                }
        }
        }
        xmlhttp.send(null) ;
        return;
}

function getPage10(){

	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
                        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
    xmlhttp.open('GET','chac.php' , true); 
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3)
	document.getElementById('ajax1').innerHTML = '<p align="center"><img border="0" src="images/loading.gif"></p>';
        	if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                                if( content ){ 
                      document.getElementById('ajax1').innerHTML = content; 
                }
        }
        }
        xmlhttp.send(null) ;
        return;
}

function getPage11(){

	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
                        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
    
    var CountryID = document.getElementById("CountryID").value;
    xmlhttp.open('GET','GetWorldNews.php?CountryID=' + CountryID , true); 
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==1 || xmlhttp.readyState==2 || xmlhttp.readyState==3)
	document.getElementById('ajax1').innerHTML = '<p align="center"><img border="0" src="images/loading.gif"></p>';
        	if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                                if( content ){ 
                      document.getElementById('ajax1').innerHTML = content; 
                }
        }
        }
        xmlhttp.send(null) ;
        return;
}

/* Mostadef Administration Area Tabs Javascript */
/* Copyright EGY2NET 4 WEB SOLUTIONS 2007 www.traidnt.net/vb */

function TabClick(sel) {

for(i=0;i<tabs;i++) {
var ss = document.getElementById('tab'+i);
if(ss!=null)
{
	ss.className='tab';
}
var zz = document.getElementById('tabbox'+i);
if(zz!=null)
{
	zz.style.display='none';
}
}

document.getElementById('tab'+sel).className='tabselected';
document.getElementById('tabbox'+sel).style.display='';

}
var tabs = 5;
for(i=0;i<tabs;i++) {
   var aa = document.getElementById('tabbox'+i);
	if(aa!=null)
	{
		aa.style.display='none'
	}
}
/*
for(i=0;i<tabs;i++) {
if(document.getElementById('tabbox'+i)!=null)
{
document.getElementById('tabbox'+i).style.display='none';
}
}*/

function setTab(num) {

configfrm.selectedtab.value=num;

}

var tabs = 5;
TabClick(0);



