var Debug = false;

var Flist = "";

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


<!-- Set Flyout script This script positions flyouts next to their parent  -->

function setFlyouts(List){
	FlyoutArray = List.split(",");
	Tops = "";
	spacer = 6;
	TopTable = document.getElementById("toptable");
	TopTable = TopTable.offsetHeight;
	TopTable = TopTable-0;

	FlyoutLeft = document.getElementById("contentregion");
	FlyoutLeft = FlyoutLeft.offsetLeft;
	FlyoutLeft = FlyoutLeft - 1;
	FlyoutLeft = 111;
	for(i=0;i<FlyoutArray.length;i++){

		FlyoutInfo = FlyoutArray[i].split(":");
		Flyout = document.getElementById("flyout"+FlyoutInfo[1]);
		Flyout = Flyout.style;
		if(FlyoutInfo[0]=="1"){
			Item = document.getElementById("firstlevel"+FlyoutInfo[1]);
			Item = Item.offsetTop;
			wd=0;
		}else if(FlyoutInfo[0]=="2"){
			if(document.getElementById("Leftsecondlevel"+FlyoutInfo[1])==null){
				Item = document.getElementById("secondlevel"+FlyoutInfo[1]);
				wd=150;
			}else{
				Item = document.getElementById("Leftsecondlevel"+FlyoutInfo[1]);
				wd=0;
			}
			Item = Item.offsetTop;
		}else if(FlyoutInfo[0]=="3"){
			if(document.getElementById("Leftsecondlevel"+FlyoutInfo[1])==null){
				Item = document.getElementById("secondlevel"+FlyoutInfo[1]);
				Item = Item.offsetTop;
				MenuTop = document.getElementById("flyout"+FlyoutInfo[2]);
				MenuTop = MenuTop.style;
				MenuTop = MenuTop.top;
				MenuTop = MenuTop.slice(0, -2);
				wd=150;
			}else{
				Item = document.getElementById("Leftsecondlevel"+FlyoutInfo[1]);
				Item = Item.offsetTop;
				if(navigator.platform=="MacPPC"){
					MenuTop = 0;
				}else{
					MenuTop = 97;
				}
				wd=0;
			}
			Item = Item-0;
			MenuTop = MenuTop-0;
			Item = Item+MenuTop;
		}else if(FlyoutInfo[0]=="4"){
			Item = document.getElementById("thirdlevel"+FlyoutInfo[1]);
			MenuTop = document.getElementById("flyout"+FlyoutInfo[2]);
			MenuTop = MenuTop.style;
			MenuTop = MenuTop.top;
			MenuTop = MenuTop.slice(0, -2);

			Item = Item.offsetTop;
			Item = Item-0;
			MenuTop = MenuTop-0;
			Item = Item+MenuTop;
			if(FlyoutInfo[3]=="F"){
				wd=300;
			}else{
				wd=150;
			}
		}
		if(navigator.platform=="MacPPC"){

			if(FlyoutInfo[0]=="1"){
				tp = TopTable+Item+spacer;
				tp = tp - 4;
				tp = tp + "px";
				Flyout.top = tp;
			}else{
				if(FlyoutInfo[0]=="2"){
					if(FlyoutInfo[2]=="F"){
						tp = TopTable+Item;
						tp = tp
						tp = tp + "px";
						Flyout.top = tp;
					}else{
						tp = TopTable+Item;
						tp = tp
						tp = tp + "px";
						Flyout.top = tp;
					}
				}else{
					tp = Item;
					tp = tp
					tp = tp + "px";
					Flyout.top = tp;
				}
			}
		}else{
			if(FlyoutInfo[0]=="1"){
				tp = TopTable+Item+spacer;
				tp = tp + "px";
				Flyout.top = tp;
			}else{
				if(FlyoutInfo[0]=="2"){
					if(FlyoutInfo[2]=="F"){
						tp = TopTable+Item;
						tp = tp + "px";
						Flyout.top = tp;
					}else{
						tp = TopTable+Item;
						tp = tp + "px";
						Flyout.top = tp;
					}
				}else{
					tp = Item;
					tp = tp + "px";
					Flyout.top = tp;
				}
			}
		}
		if(navigator.platform!="MacPPC"){
			Flyout.left = Number(FlyoutLeft+wd)+800;
		}else{
			Flyout.left = Number(FlyoutLeft+wd);
		}
	}
}

function itemWithFlyout(itemname, classN){
	if(document.getElementById(itemname)!=null){
		Item = document.getElementById(itemname);
		Item.className = classN;
	}
}


function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  	if ((obj=MM_findObj(args[i]))!=null) { 
		mystr = new String(args[i]);
		mystr = mystr.replace("flyout", "");
		MenuMatch = true;
		//if(Flist!=""){
			//ToplevelHidden = Flist.split(",");
			//for(Y=0;Y<ToplevelHidden.length;Y++){
				//if(ToplevelHidden[Y]==mystr){
					//MenuMatch = false;
				//}
			//}
		//}
		if(MenuMatch){
			v=args[i+2];
    		if (obj.style) { 
				obj=obj.style; 
				v=(v=='show')?'visible':(v=='hide')?'hidden':v;
			}
    		obj.visibility=v; 
			if(navigator.platform!="MacPPC"){
				if(v=='visible'){
					obj.left = parseInt(obj.left)-800;
				}else{
					obj.left = parseInt(obj.left)+800;
				}
			}
		}
	}
}

function onclickgo(URL, MyTarget){
	if(MyTarget==""||MyTarget==null){
		parent.location.replace(URL);
	}else if(MyTarget=="_blank"||MyTarget=="newWindow"){
		window.open(URL, "newWindow");
	}
}

function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 
bw=new verifyCompatibleBrowser() 
 
 
var speed=50 
 
var loop, timer 
 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function MoveArea(x,y){ 
    this.x=x;this.y=y 
    this.css.left=this.x 
    this.css.top=this.y 
} 
 
function MoveAreaDown(move){ 
	if(this.y>-this.scrollHeight+objContainer.clipHeight){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".down("+move+")",speed) 
	} 
} 
function MoveAreaUp(move){ 
	if(this.y<0){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".up("+move+")",speed) 
	} 
} 
 
function PerformScroll(speed){ 
	if(initialised){
		loop=true; 
		if(speed>0) objScroller.down(speed) 
		else objScroller.up(speed) 
	}
} 
 
function CeaseScroll(){ 
    loop=false 
    if(timer) clearTimeout(timer) 
} 
var initialised; 
function InitialiseScrollableArea(){ 
    objContainer=new ConstructObject('divContainer') 
    objScroller=new ConstructObject('divContent','divContainer') 
    objScroller.MoveArea(0,0) 
    objContainer.css.visibility='visible' 
    initialised=true; 
}

function setFormValues(Svalue, Tvalue, SubValue, Address, Numb){
	document.form1.Submit.value = Svalue;
	document.form1.title.value = Tvalue;
	document.form1.subtitle.value = SubValue;
	document.form1.address.value = Address;
	document.form1.linknumber.value = Numb;
	document.getElementById("titletext").innerHTML = "edit link";
}

function reorder(X){
	document.form1.Cimage.value = X;
	document.form1.submit();
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function fullscreen(){
	width = screen.width + 30;
	height = screen.height+ 30;
	newWindow = window.open("/mypmc/fullSS.asp","test","fullscreen=1,width="+width+",height="+height+",top=0,left=0,scrollbars=NO");
}
function fullclose(){
	window.close();
}
function ChangeBtns(){
	document.getElementById("btns").innerHTML = "Your photo is uploading, please wait...";
}
function SturbStart(){
	width = screen.width + 30;
	height = screen.height+ 30;
	newWindow = window.open("/mypmc/SturbStart.asp");
}