// JavaScript Document
function getPage(page){

if (page=="design") document.getElementById('designpic').src='images/progress.gif';
if (page=="hosting") document.getElementById('hostingpic').src='images/progress.gif';
if (page=="promotion") document.getElementById('promotionpic').src='images/progress.gif';
if (page=="programming") document.getElementById('programmingpic').src='images/progress.gif';

var xmlhttp=false; //Clear our fetching variable
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
        var file = 'text.php?page='; //This is the path to the file we just finished making *
		//alert(page);
    xmlhttp.open('GET', file + page, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
    xmlhttp.setRequestHeader('Content-Type', 'text/html; charset:utf-8');
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4) { //Check if it is ready to recieve data
                var content = xmlhttp.responseText; //The content data which has been retrieved ***
                if( content ){ //Make sure there is something in the content variable
                        document.getElementById('content').innerHTML = content;  
						document.getElementById('designpic').src='images/small-design.gif';
						document.getElementById('hostingpic').src='images/small-hosting.gif';
						document.getElementById('promotionpic').src='images/small-publish.gif';
						document.getElementById('programmingpic').src='images/small-programming.gif';
		
					  
                }
        }
        }
        xmlhttp.send(null) //Nullify the XMLHttpRequest
		
return;
}

function pausecomp(millis) 
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); } 
while(curDate-date < millis);
}


function MM(targ){

document.getElementById('design').style.display='block';
document.getElementById('desgin_link').className='currentM';
document.getElementById('host').style.display='block';
document.getElementById('host_link').className='currentM';
document.getElementById('publish').style.display='block';
document.getElementById('publish_link').className='currentM';
document.getElementById('prog').style.display='block';
document.getElementById('prog_link').className='currentM';

pausecomp(100);

if (targ != 'desgin_link') {document.getElementById('design').style.display='none';
document.getElementById('desgin_link').className='rightmenu';
}
if (targ != 'host_link')   {document.getElementById('host').style.display='none';
document.getElementById('host_link').className='rightmenu';}
if (targ != 'publish_link'){document.getElementById('publish').style.display='none';
document.getElementById('publish_link').className='rightmenu';}
if (targ != 'prog_link')   {document.getElementById('prog').style.display='none';
document.getElementById('prog_link').className='rightmenu';}
}