	function showhide(id)
    {
        if (document.getElementById(id).style.visibility == 'hidden')
            {
                document.getElementById(id).style.visibility = 'visible';
            }
        else
            {
                document.getElementById(id).style.visibility = 'hidden';
            }

    }
	
function stoperror()
    {
        return true;
    }
window.onerror=stoperror;

	function changeOpacity3(offset, id)  
     {   
       var main = document.getElementById(id).style;  
	   //alert(main);
        main.top = offset + "px";
      // object.filter = "alpha(opacity=" + opacity + ")";   
     }  
         
     function setOpacity3(id, opStart, opEnd, ms)  
     {              
       var speed = Math.round(ms / 100);   
       var timer = 0;   
 
       if(opStart > opEnd)  
       {   
         for(i = opStart; i >= opEnd; i--)  
         {   
         setTimeout(  
           "changeOpacity(" + i + ",'" + id + "')",  
           (timer * speed)  
         );   
           timer++;   
         }  
       }   
       else if(opStart < opEnd)  
       {   
         for(i = opStart; i <= opEnd; i++)   
         {  
           setTimeout(  
             "changeOpacity3(" + i + ",'" + id + "')",  
             (timer * speed)  
           );   
           timer++;  
         }  
       }  
     }
function checkData (){
 if (document.FormMail.FieldData0.value == "") {
  alert("Full Name Is Required.")
  document.FormMail.FieldData0.focus()
  return false}
if (document.FormMail.FieldData1.value != document.FormMail.vemail.value) { 
						alert("E-mail Addresses do not match, please correct this before posting your ticket");
						return false;
					}
					if (document.FormMail.FieldData1.value == '') { 
						alert("An e-mail address is required!");
						return false;
					}
				
				
 if (document.FormMail.FieldData4.value == "") {
  alert("Please Select A Category")
  document.FormMail.FieldData0.focus()
  return false}
 if (document.FormMail.FieldData5.value == "") {
  alert("Please Fill In The Question/Problem Field")
  document.FormMail.FieldData0.focus()
  return false}
}
	 
	 
function downme(main, width, height, direct, pause) { //v5.0 GlobalWebFactory

    //var main = document.getElementById(main);
  
  
  //var speed = Math.max(1.001, Math.min((direct == "up" || direct == "down") ? height : width, speed));
   // if (!document.getElementById) return false;
       	   
       var tt = 0;   
	//var offset = Math.floor(1000 / speed);
	//alert(offset);
	//setOpacity3(main, 0, 300, pause) 
	  for(i = 0; i <= 75; i++)   
         {  
		 //alert(timer * pause * i);
           
             setTimeout( "changeOpacity3(" + i + ",'" + main + "')", (i*tt)/((i*tt)/(tt*tt))*pause);
           tt++; 		   
         }  
      
    
}



function MM_preloadImages() { //v5.0 GlobalWebFactory
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}
	if( i == a.length ) {
	}
	}
}

function loadcontents() { //v5.0 GlobalWebFactory
MM_preloadImages('images/mainpage_darkblue.jpg','images/mainpage_lightblue.jpg','images/blog_darkblue.jpg','images/blog_lightblue.jpg','images/protfolio_darkblue.png','images/portfolio_lightblue.png','images/sites_darkblue.jpg','images/sites_lightblue.jpg','images/offers_darkblue.jpg','images/offers_lightblue.jpg','images/aboutus_darkblue.jpg','images/aboutus_lightblue.jpg','images/creativesurfer.net_lightblue.jpg','images/creativesurfer.net_darkblue.jpg','loading.gif');
}


// Get the HTTP Object
function getHTTPObject(){
   if (window.ActiveXObject) return new ActiveXObject("Microsoft.XMLHTTP");
   else if (window.XMLHttpRequest) return new XMLHttpRequest();
   else {
      alert("Your browser does not support AJAX.");
      return null;
   }
}   
function updatewlcm(gg){
var http = new XMLHttpRequest();
var url = "home.php";
var introtext = document.editform.intro.value;
var fstext = document.editform.fs.value;
var edittext = document.editform.edit.value;
var params = "edit=" + edittext + "&intro=" + introtext + "&fs=" + fstext + "";
http.open("POST", url, true);

//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");

http.onreadystatechange = function() {//Call a function when the state changes.
	if(http.readyState == 4 && http.status == 200) {
		// document.getElementById('myBody').innerHTML = http.responseText;
		loadSite(gg);
	}
}
http.send(params);
}

function gogo(){
	loadSite('reports.php?mess=gggggg');
}
function addnewsadd(gg){
var http = new XMLHttpRequest();
var url = "reports.php";
var titletext = document.addnews.title.value;
var newstext = document.addnews.news.value;
var addtext = document.addnews.add.value;
var params = "add=" + addtext + "&title=" + titletext + "&news=" + newstext + "";
http.open("POST", url, true);

//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");

http.onreadystatechange = function() {//Call a function when the state changes.
	if(http.readyState == 4 && http.status == 200) {
		// document.getElementById('myBody').innerHTML = http.responseText;
		loadSite(gg);
	}
}
http.send(params);
}
function addreportadd(gg){
var http = new XMLHttpRequest();
var url = "reports.php";
var titletext = document.addreport.title.value;
var srctext = document.addreport.src.value;
var addrtext = document.addreport.addr.value;
var params = "addr=" + addrtext + "&title=" + titletext + "&src=" + srctext + "";
http.open("POST", url, true);

//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");

http.onreadystatechange = function() {//Call a function when the state changes.
	if(http.readyState == 4 && http.status == 200) {
		// document.getElementById('myBody').innerHTML = http.responseText;
		loadSite(gg);
	}
}
http.send(params);
}


// Change the value of the outputText field
function setOutput(){
   if(httpObject.readyState == 4){
      document.getElementById('myBody').innerHTML = httpObject.responseText;
	  
	document.getElementById('myBody').style.display = '';
	document.getElementById('loader').style.display = 'none';
   }
}


// Implement business logic
function loadSite(ff){
	document.getElementById('loader').style.display = '';
	document.getElementById('myBody').style.display = 'none';
   httpObject = getHTTPObject();
   if (httpObject != null) {
      httpObject.open("GET", ff, true);
      httpObject.send(null);
      httpObject.onreadystatechange = setOutput;
   }
}

// Change the value of the outputText field
function setOutput2(ff){
   if(httpObject.readyState == 4){
		loadSite(ff + '&finished=1');
	}
}
// Implement business logic
function loadSite2(ff){
	document.getElementById('loader').style.display = '';
	document.getElementById('myBody').style.display = 'none';
   httpObject = getHTTPObject();
   if (httpObject != null) {
      httpObject.open("GET", ff, true);
      httpObject.send(null);
      httpObject.onreadystatechange = function() {//Call a function when the state changes.
	if(httpObject.readyState == 4 && httpObject.status == 200) {
		// document.getElementById('myBody').innerHTML = http.responseText;
		setOutput2(ff);
	}
   }
   }
}
var httpObject = null;

// Implement business logic
function mainenter(){
   httpObject = getHTTPObject();
   if (httpObject != null) {
      httpObject.open("GET", 'mainenter.php', true);
      httpObject.send(null);
      httpObject.onreadystatechange = function() {//Call a function when the state changes.
	if(httpObject.readyState == 4 && httpObject.status == 200) {
		 document.getElementById('bodyin').innerHTML = httpObject.responseText;
	}
   }
   }
}
var httpObject = null;
// Implement business logic
function maienenter(){
   httpObject = getHTTPObject();
   if (httpObject != null) {
      httpObject.open("GET", 'ma2.php', true);
      httpObject.send(null);
      httpObject.onreadystatechange = function() {//Call a function when the state changes.
	if(httpObject.readyState == 4 && httpObject.status == 200) {
		 document.getElementById('bodyin').innerHTML = httpObject.responseText;
	}
   }
   }
}
var httpObject = null;


	function hihihi(){
	$('AjaxUploaderFiles_Loader').style.display='none';
	CuteWebUI_AjaxUploader_Initialize('AjaxUploaderFiles_Loader');
	}

	 function CuteWebUI_AjaxUploader_OnTaskComplete(task)
	 {
		// var div=document.createElement("DIV");
		// var link=document.createElement("A");
		// link.setAttribute("href","savefiles/"+task.FileName);
		// link.innerHTML="You have uploaded file : savefiles/"+task.FileName;
		// link.target="_blank";
		// div.appendChild(link);
		// document.body.appendChild(div);
		document.addreport.src.value = task.FileName;
		document.getElementById('hh2').innerHTML = task.FileName;
		document.getElementById('button').style.display = "none";
		document.getElementById('input').style.display = "";
	 }
	 function remove()
	 {
		document.addreport.src.value = '';
		document.getElementById('hh2').innerHTML = '';
		document.getElementById('button').style.display = "";
		document.getElementById('input').style.display = "none";
	 }
	 
	 
	 
	 
	 
	
	function changeOpacity(opacity, id)  
     {   
       var object = document.getElementById(id).style;   
       object.opacity = (opacity / 100);  
       object.MozOpacity = (opacity / 100);   
       object.KhtmlOpacity = (opacity / 100);   
      // object.filter = "alpha(opacity=" + opacity + ")";   
     }  
         
     function setOpacity(id, opStart, opEnd, ms)  
     {              
       var speed = Math.round(ms / 100);   
       var timer = 0;   
 
       if(opStart > opEnd)  
       {   
         for(i = opStart; i >= opEnd; i--)  
         {   
         setTimeout(  
           "changeOpacity(" + i + ",'" + id + "')",  
           (timer * speed)  
         );   
           timer++;   
         }  
       }   
       else if(opStart < opEnd)  
       {   
         for(i = opStart; i <= opEnd; i++)   
         {  
           setTimeout(  
             "changeOpacity(" + i + ",'" + id + "')",  
             (timer * speed)  
           );   
           timer++;  
         }  
       }  
     }
	  
	

function EditMe(f,ml,id,event,type,fullpath){
		if(!(ml)){
			mylink = 'index.php';
		} else mylink = ml + '.php?id=' + id + '&type=' + type + '&fullpath=' + fullpath;
		if(type=="Comment"){
		mylink = ml + '.php?commentid=' + id + '&type=' + type + '&fullpath=' + fullpath;
		}
	window.addEvent('domready', function() {
	$(f).addEvent(event, function(e) {
		e.stop();
		document.getElementById('overlay').style.display = '';
		$('containerbodycontent').style.display='none';
		window.setTimeout( function() { $('containerbodycontentloading').style.display=''; } , 500);
			
		
			
		//Empty the log and show the spinning indicator.
		//$('mainenter').style.display='none';
		//$('mainloading').style.display='';
		//Set the options of the form's Request handler. 
		//("this" refers to the $('myForm') element).
		this.set('send', {onComplete: function(response) {
			window.setTimeout( function() { $('containerbodycontent').set('html', response); $('containerbodycontentloading').style.display='none'; $('containerbodycontent').style.display='';  } , 1000);
			
		}});
		//Send the form.
		this.send();
	});
	});
	};


		function fullwin(){
		window.open("http://localhost/GlobalWebFactory/glob/","","fullscreen,scrollbars")
		}
	
	function gohomingin(f,ml){
		if(!(ml)){
			mylink = 'home.php';
		} else mylink = ml + '.php';
		if (f == "corporatedetails" || f == "enterprisedetails" || f == "businessdetails"){
		mylink = ml + '.php?planname='+f;
		}
		
	window.addEvent('domready', function() {
	$(f).addEvent('click', function(e) {
		e.stop();
		//Empty the log and show the spinning indicator.
				var object = document.getElementById('whbodycontent').style;   
			   object.opacity = (0);  
			   object.MozOpacity = (0);   
			   object.KhtmlOpacity = (0);   
			   //object.filter = "alpha(opacity=0)";
			$('whbodycontent').style.display='none';
			window.setTimeout( function() { $('whbodycontentloading').style.display=''; } , 500);
		//$('mainenter').style.display='none';
		//$('mainloading').style.display='';
		//Set the options of the form's Request handler. 
		//("this" refers to the $('myForm') element).
		this.set('send', {onComplete: function(response) {
			window.setTimeout( function() { $('whbodycontent').set('html', response); $('whbodycontentloading').style.display='none'; $('whbodycontent').style.display=''; setOpacity('whbodycontent', 0, 100, 400);  } , 1000);
			
						
		}});
		//Send the form.
		this.send();
	
	});
	});
	};


function show(id1,id2,id3,id4,id5){
if(id1) document.getElementById(id1).style.display = '';
if(id2) document.getElementById(id2).style.display = '';
if(id3) document.getElementById(id3).style.display = '';
if(id4) document.getElementById(id4).style.display = '';
if(id5) document.getElementById(id5).style.display = '';
}

function hide(id1,id2,id3,id4,id5){
if(id1) document.getElementById(id1).style.display = 'none';
if(id2) document.getElementById(id2).style.display = 'none';
if(id3) document.getElementById(id3).style.display = 'none';
if(id4) document.getElementById(id4).style.display = 'none';
if(id5) document.getElementById(id5).style.display = 'none';
}



	function goSubmit(f,ml){
		if(!(ml)){
			mylink = 'home.php';
		} else mylink = ml + '.php';
		if(ml=="comment"){
		fname = document.getElementById(f + 'fullname');
		email = document.getElementById(f + 'email');
		country = document.getElementById(f + 'comments');
		if(fname.value==""){
		  alert("Please Type In The Full Name");
		  fname.focus();
		  return false;
		}
		if(email.value==""){
		  alert("Please Type In The Email Address");
		  email.focus();
		  return false;
		}
		if (!email.value.match('^[A-z0-9\._-]+@[a-z0-9][a-z0-9_-]*(\.[a-z0-9_-]+)*'+'\.([a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|'+'int|mil|museum|name|net|org|pro|travel)$', 'i'))
		{
		  alert("Please Type In A Correct Email Address.");
		  email.focus();
		  return false;
		}
		if(country.value==""){
		  alert("Please Type In Your Comment");
		  country.focus();
		  return false;
		}
		}
	window.addEvent('domready', function() {
	$(f).addEvent('submit', function(e) {
		e.stop();
		//Empty the log and show the spinning indicator.
		document.getElementById(f + 'place').style.display = 'none';
		document.getElementById(f + 'loading').style.display = '';
		//$('mainenter').style.display='none';
		//$('mainloading').style.display='';
		//Set the options of the form's Request handler. 
		//("this" refers to the $('myForm') element).
		this.set('send', {onComplete: function(response) {
			$(f + 'place2').set('html', response);
		document.getElementById(f + 'place2').style.display = '';
		document.getElementById(f + 'place').style.display = 'none';
		document.getElementById(f + 'loading').style.display = 'none';
		}});
		//Send the form.
		this.send();
	});
	});
	};
