	
	

	function your_function() {
		// your stuff here
		generate_adv();generate_shoppingmall();start();
	}




function createXMLHttpRequest(){
	try{
		xmlHttp=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");
	}catch(e){
		alert('There was a problem creating the XMLHttpRequest object'); 
	}
	return xmlHttp;
}

function createXMLHttpRequest1(){
	try{
		xmlHttp1=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");
	}catch(e){
		alert('There was a problem creating the XMLHttpRequest object'); 
	}
	return xmlHttp1;
}



function generate_adv(){
    var xmlHttp = createXMLHttpRequest();
	xmlHttp.open("POST","/generate_advertise.asp",false);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
	xmlHttp.setRequestHeader('Content-length', '0');
	xmlHttp.send('');
	//xmlHttp.onreadystatechange=function(){ 
	//	if(xmlHttp.readyState==4&&xmlHttp.status==200){			
			//document.getElementById("generate_adv_list").innerHTML=xmlHttp.responseText;
			document.getElementById("generate_adv_list").innerHTML=xmlHttp.responseText;
  	        setTimeout("generate_adv()", 30000);
	//	}
	//}
	//xmlHttp.send(null);
}

function generate_shoppingmall(){
	var xmlHttp1 = createXMLHttpRequest1();
	xmlHttp1.open("POST","/generate_shopping_mall.asp?",false);
	xmlHttp1.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
	xmlHttp1.setRequestHeader('Content-length', '0');
	xmlHttp1.send('');
//	xmlHttp1.onreadystatechange=function(){ 
//	if(xmlHttp1.readyState==4&&xmlHttp1.status==200){			
			document.getElementById("generate_shopping_mall").innerHTML=xmlHttp1.responseText;
  	        setTimeout("generate_shoppingmall()", 20000);
//		}
//	}
//	xmlHttp1.send(null);
}


var swidth=350;

//scroller's height
var sheight=80;


//scroller's speed 
var sspeed=3;
var restart=sspeed;
var rspeed=sspeed;

//scroller's pause 
var spause=2500;

//scroller's background
var sbcolor="#ccffcc";

//messages: set your own; use as many as you'd like; set up Hyperlinks to
//URLs as you normally do: <a target=... href="... URL ...">..message..</a>;


//singletext[...]='...';
//-- end Parameters and message -->

//-- begin: Scroller's Algorithm -->
var ii=0;
function goup(){if(sspeed!=rspeed*16){sspeed=sspeed*2;restart=sspeed;}}

function start(){
if(document.getElementById){ns6div=document.getElementById('iens6div');ns6div.style.top=sheight+"px";ns6div.innerHTML=singletext[0];sizeup=ns6div.offsetHeight;ns6scroll();}
else 
if(document.layers){ns4layer=document.ns4div.document.ns4div1;ns4layer.top=sheight;ns4layer.document.write(singletext[0]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}
else 
if(document.all){iediv=iens6div;iediv.style.pixelTop=sheight+"px";iediv.innerHTML=singletext[0];sizeup=iediv.offsetHeight;iescroll();}}
function iescroll(){if(iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){iediv.style.pixelTop=0;setTimeout("iescroll()",spause);}else 
if(iediv.style.pixelTop>=sizeup*-1){iediv.style.pixelTop-=sspeed+"px";setTimeout("iescroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;iediv.style.pixelTop=sheight+"px";iediv.innerHTML=singletext[ii];sizeup=iediv.offsetHeight;iescroll();}}
function ns4scroll(){if(ns4layer.top>0&&ns4layer.top<=sspeed){ns4layer.top=0;setTimeout("ns4scroll()",spause);}else 
if(ns4layer.top>=sizeup*-1){ns4layer.top-=sspeed;setTimeout("ns4scroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;ns4layer.top=sheight;ns4layer.document.write(singletext[ii]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}}
function ns6scroll(){if(parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){ns6div.style.top=0;setTimeout("ns6scroll()",spause);}else 
if(parseInt(ns6div.style.top)>=sizeup*-1){ns6div.style.top=parseInt(ns6div.style.top)-sspeed+"px";setTimeout("ns6scroll()",100);}
else{if(ii==singletext.length-1)ii=0;else ii++;
ns6div.style.top=sheight+"px";ns6div.innerHTML=singletext[ii];sizeup=ns6div.offsetHeight;ns6scroll();}}


	function my_simple_onload(f) {
		if (document.body) {
			onbeforeimages(f);
		} else {
			setTimeout(function() { my_simple_onload(f); }, 1);
		}
	}

	function onbeforeimages(f) {
		var image = new Image();
		image.onload = image.onerror =
			function () {
				// images are loading...
				//window.status += ' * onBeforeImages';
				setTimeout(f, 10);
				image.onerror = null;
				image = null;
			};
		image.src = '.';
//		image.src = 'about:blank';
	}

	if (typeof window.addEventListener == 'function') {
		window.addEventListener('load',
			function (e) {
				//window.status += ' * onLoad';
			}, false);
	} else {
		window.attachEvent('onload',
			function (e) {
				//window.status += ' * onLoad';
			});
	}

