/*---------------------------
   Designer : alEx cAo(caoxin)
   Date : 2002-1-3
   Studio : alEx DESIgn
   Function : Yes_Win ; SetCopy ; show ; hide ; mOvr ; mOut ; changeIMG ; MM_swapImgRestore ; MM_preloadImages ...
---------------------------*/

//document.oncontextmenu=new Function('event.returnValue=false;');
//document.onselectstart=new Function('event.returnValue=false;');

function Yes_Win(URL,Name,Width,Height,Scrollpara){
    if (!Width) { Width = 515;}
    if (!Height){ Height = 400;}
    if (!Name)  { Name  = "yes";}
    if (!Scrollpara)  { Scrollpara  = "yes";}
    var topPos = screen.height/2-Height/2
    var leftPos = screen.width/2-Width/2
    var win_cfg = "status=no,scrollbars="+Scrollpara+",location=no,resizable=no,top="+topPos+",left="+leftPos+",width=" + Width + ",height=" + Height;
//  alert("Window URL : "+URL+" \nWindow Name : "+Name+"\nWindow Config : "+"["+win_cfg+"]")
    newWin = window.open(URL,Name,win_cfg);
    newWin.focus();
}

function SetCopy(){
  document.write("<hr size=\"1\" color=\"#000000\"><font class=\"copy\">DESIgnEr : alEx cAo _<br>®2001 alEx.cAo . All rights reserved . Terms of Use . </font>");
}

/* function show(id){
//  if (id.style.display=="none")
///    {
	id.style.display=""
	}
  else
	{
	id.style.display="none"
	}
}*/

function show(thing){
  thing.style.display=""
}

function hide(thing){
  thing.style.display="none"
}

function mOvr(src,clrOver) {
  if (!src.contains(event.fromElement))
    { src.style.cursor = 'hand'; src.bgColor = clrOver; }
}

function mOut(src,clrIn) {
  if (!src.contains(event.toElement))
    { src.style.cursor = 'default'; src.bgColor = clrIn; }
}

function mClk(src) {
  if(event.srcElement.tagName=='TD')
     src.children.tags('A')[0].click();
}

var blank = ""
function changeIMG() { // Coded by Alex Cao .. use it to change the graphic every time !
	var place = document.URL.lastIndexOf("/");
	var myURL = document.URL.slice(0 , place+1);
	what = IMG;
	//alert(what.innerHTML);
	if (what.innerHTML == "<IMG height=45 src=../../js//%22%22%2Bblank%2B%22images_index/new_interface_slice_03.gif/%22 width=311>"){
		what.innerHTML = "<IMG height=45 src=../../js//%22images_index/new_interface_slice_03_0.gif/%22 width=311>";
		blank = myURL
		//alert(blank)
		setTimeout('changeIMG()',5000);
  	}
  	else {
  		what.innerHTML = "<IMG height=45 src=../../js//%22images_index/new_interface_slice_03.gif/%22 width=311>";
  		setTimeout('changeIMG()',5000);
  	}
}

  //SCROLLBAR-HIGHLIGHT-COLOR: buttonface;
  //SCROLLBAR-SHADOW-COLOR: buttonface;
  //SCROLLBAR-3DLIGHT-COLOR: buttonhighlight;
  //SCROLLBAR-TRACK-COLOR: #eeeeee;
  //SCROLLBAR-DARKSHADOW-COLOR: buttonshadow 
  
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  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; ia.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&id.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function movstar(a,time){
	movx=setInterval("mov("+a+")",10)
	}
function movover(){
	clearInterval(movx)
	}
function mov(a){
	scrollx=new_date.document.body.scrollLeft
	scrolly=new_date.document.body.scrollTop
	scrolly=scrolly+a
	new_date.window.scroll(scrollx,scrolly)
	}
function o_down(theobject){
        object=theobject
	while(object.filters.alpha.opacity>60){
		object.filters.alpha.opacity+=-10}
		}
function o_up(theobject){
        object=theobject
	while(object.filters.alpha.opacity<100){
		object.filters.alpha.opacity+=10}
		}
function wback(){
	if(new_date.history.length==0){window.history.back()}
	else{new_date.history.back()}
	}
	
function changeIFrame(where,name){//use in flash
	window.new_date.location.href=where;
	index.src="images/"+name+".gif";
	//alert(index.src);
}