
//------ set from --------------------------------------
function setfromml(){
from = document.ml.elements[0].value;
document.ml._from_.value = from;
}
function setfromquery(){
from = document.query.elements[0].value;
document.query._from_.value = from;
}
function setfromticket(){
from=document.ticket.elements[4].value;
document.ticket._from_.value = from;
}
// ---------------------------------------------------------------
system = navigator.userAgent.toUpperCase();
b = navigator.userAgent.toUpperCase();
browser = navigator.appName.toUpperCase();
ver = navigator.appVersion;


pltWin = window;
function openplt(url){
	if (browser.indexOf("NETSCAPE") >=0 && ver.indexOf("5") >= 0 || system.indexOf("WIN") >= 0) {
		if(pltWin == window || pltWin.closed){
			pltWin=window.open(url,"pltwin",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,width=710,height=390,left=145,top=120');
		}else{
			window.pltWin.focus();
			pltWin.location.replace(url);
		}
	}else {
		if(pltWin == window || pltWin.closed){
			pltWin=window.open(url,"pltwin",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,width=710,height=390,left=145,top=120');
		}else{
			window.pltWin.focus();
			pltWin.location.replace(url);
		}
	}
}

// ---------------------------------------------------------------
system = navigator.userAgent.toUpperCase();
b = navigator.userAgent.toUpperCase();
browser = navigator.appName.toUpperCase();
ver = navigator.appVersion;


pWin = window;
function openProfile(url){
	if (browser.indexOf("NETSCAPE") >=0 && ver.indexOf("5") >= 0 || system.indexOf("WIN") >= 0) {
		if(pWin == window || pWin.closed){
			pWin=window.open(url,"profilewin",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=516,height=500');
		}else{
			window.pWin.focus();
			pWin.location.replace(url);
		}
	}else {
		if(pWin == window || pWin.closed){
			pWin=window.open(url,"profilewin",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=500');
		}else{
			window.pWin.focus();
			pWin.location.replace(url);
		}
	}
}

// ---------------------------------------------------------------
system = navigator.userAgent.toUpperCase();
b = navigator.userAgent.toUpperCase();
browser = navigator.appName.toUpperCase();
ver = navigator.appVersion;


nWin = window;
function opennews(url){
	if (browser.indexOf("NETSCAPE") >=0 && ver.indexOf("5") >= 0 || system.indexOf("WIN") >= 0) {
		if(nWin == window || nWin.closed){
			nWin=window.open(url,"newswin",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=516,height=380');
		}else{
			window.nWin.focus();
			nWin.location.replace(url);
		}
	}else {
		if(nWin == window || nWin.closed){
			nWin=window.open(url,"newswin",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=380');
		}else{
			window.nWin.focus();
			nWin.location.replace(url);
		}
	}
}

// ---------------------------------------------------------------
b = navigator.userAgent.toUpperCase();
tWin = window;
function opentext(url){
if(tWin == window || tWin.closed){
tWin=window.open(url,"textwin","width=484,height=380,status=1,scrollbars=1,resizable=1");
}
else {
window.tWin.focus();
tWin.location.replace(url);
}
}
// ---------------------------------------------------------------
b = navigator.userAgent.toUpperCase();
fWin = window;
function openflier(url){
if(fWin == window || fWin.closed){
fWin=window.open(url,"flierwin","width=536,height=480,status=1,scrollbars=1,resizable=1,left=230,top=120");
}
else {
window.fWin.focus();
fWin.location.replace(url);
}
}
// ---------------------------------------------------------------
b = navigator.userAgent.toUpperCase();
f2Win = window;
function openflier2(url){
if(f2Win == window || f2Win.closed){
f2Win=window.open(url,"flierwin2","width=536,height=380,status=1,scrollbars=1,resizable=1,");
}
else {
window.f2Win.focus();
f2Win.location.replace(url);
}
}
// ---------------------------------------------------------------
b = navigator.userAgent.toUpperCase();
phwin = window;
function openphoto(url){
if(phwin == window || phwin.closed){
phwin=window.open(url,"photo","width=400,height=300,status=0,scrollbars=0,resizable=0,");
}
else {
window.phwin.focus();
phwin.location.replace(url);
}
}
// ---------------------------------------------------------------
b = navigator.userAgent.toUpperCase();
phwin = window;
function openposter(url){
if(phwin == window || phwin.closed){
phwin=window.open(url,"photo","width=460,height=670,status=0,scrollbars=0,resizable=0,");
}
else {
window.phwin.focus();
phwin.location.replace(url);
}
}
// ---------------------------------------------------------------
b = navigator.userAgent.toUpperCase();
phwin = window;
function openposter2(url){
if(phwin == window || phwin.closed){
phwin=window.open(url,"photo","width=640,height=490,status=0,scrollbars=0,resizable=0,");
}
else {
window.phwin.focus();
phwin.location.replace(url);
}
}
// ---------------------------------------------------------------
b = navigator.userAgent.toUpperCase();
phwin = window;
function openposter4(url){
if(phwin == window || phwin.closed){
phwin=window.open(url,"photo","width=750,height=650,status=0,scrollbars=1,resizable=0,");
}
else {
window.phwin.focus();
phwin.location.replace(url);
}
}
// ---------------------------------------------------------------
b = navigator.userAgent.toUpperCase();
phwin = window;
function openposter3(url){
if(phwin == window || phwin.closed){
phwin=window.open(url,"photo","width=660,height=650,status=0,scrollbars=1,resizable=0,");
}
else {
window.phwin.focus();
phwin.location.replace(url);
}
}
// ---------------------------------------------------------------
b = navigator.userAgent.toUpperCase();
phwin = window;
function openposter5(url){
if(phwin == window || phwin.closed){
phwin=window.open(url,"photo","width=650,height=480,status=0,scrollbars=1,resizable=0,");
}
else {
window.phwin.focus();
phwin.location.replace(url);
}
}
// ---------------------------------------------------------------
b = navigator.userAgent.toUpperCase();
diarywin = window;
function opendiary(url){
if(diarywin == window || diarywin.closed){
diarywin=window.open(url,"diary","width=600,height=400,status=1,scrollbars=1,resizable=1,");
}
else {
window.diarywin.focus();
diarywin.location.replace(url);
}
}
// ---------------------------------------------------------------
// ____________________________openNewWin
vwin = window;
function openvalwin(url,w,h,l,t){
if(vwin == window || vwin.closed){
vwin=window.open(url,"valwin","left="+l+",top="+t+",width="+w+",height="+h+",status=yes,scrollbars=no,resizable=yes,");
}
else {
window.vwin.focus();
vwin.location.replace(url);
}
}

// ____________________________openNewWin
popwin = window;
function openpop(url,w,h,l,t){
if(popwin == window || popwin.closed){
popwin=window.open(url,"popwin","left="+l+",top="+t+",width="+w+",height="+h+",status=no,scrollbars=no,resizable=no,");
}
else {
window.popwin.focus();
popwin.location.replace(url);
}
}

// ____________________________openNewWin20050404
Nwin = window;
function openNewWin(url,w,h,l,t){
if(Nwin == window || Nwin.closed){
Nwin=window.open(url,"Nwin","left="+l+",top="+t+",width="+w+",height="+h+",status=no,scrollbars=no,resizable=no,");
}
else {
window.Nwin.focus();
Nwin.location.replace(url);
}
}
// ____________________________openNewWin20050404
Nwin2 = window;
function openNewWin2(url,w,h,l,t){
if(Nwin2 == window || Nwin2.closed){
Nwin2=window.open(url,"Nwin2","left="+l+",top="+t+",width="+w+",height="+h+",status=no,scrollbars=no,resizable=no,");
}
else {
window.Nwin2.focus();
Nwin2.location.replace(url);
}
}


function setxy() {

top.head.document.mpos.posx.value = eval(x);
top.head.document.mpos.posy.value = eval(y);

}
function getxy() {

x = eval(top.head.document.mpos.posx.value);
y = eval(top.head.document.mpos.posy.value);

}


// ---------------------------------------------------------------

b = navigator.userAgent.toUpperCase();

stepx = 0;
stepy = 0;
x = 0;
y = 0;
xlength=0;
ylength=0;


function yojohhan(xlength,ylength) {
getxy();
xlength = x + xlength;
ylength = y + ylength;
stepx = x;
stepy = y;

if (b.indexOf("MAC") >=0) {
	while(x < xlength && x < 6000){
		stepx += 50;
		x = stepx;
		top.main.scroll(x,y);
		
	}
	while(x > xlength && x > 0){
		stepx -= 50;
		x = stepx;
		top.main.scroll(x,y);
		
	}
	while(y < ylength && y < 8250){
		stepy += 30;
		y = stepy;
		top.main.scroll(x,y);
		
	}
	while(y > ylength && y > 0){
		stepy -= 30;
		y = stepy;
		top.main.scroll(x,y);
		
	}
	top.main.resizeBy(0,0);
	setxy();

}else{

	while(x < xlength && x < 6000){
		stepx += 20;
		x = stepx;
		top.main.scroll(x,y);
		
	}
	while(x > xlength && x > 0){
		stepx -= 20;
		x = stepx;
		top.main.scroll(x,y);
		
	}
	while(y < ylength && y < 8250){
		stepy += 5;
		y = stepy;
		top.main.scroll(x,y);
		
	}
	while(y > ylength && y > 0){
		stepy -= 5;
		y = stepy;
		top.main.scroll(x,y);
		
	}
	top.main.resizeBy(0,0);
	setxy();
}
}

function absyojohhan(absx,absy) {
getxy();

if (b.indexOf("MAC") >=0) {
	while(x < absx){
		stepx = x;
		stepx += 50;
		x = stepx;
		top.main.scroll(x,y);
		top.main.resizeBy(0,0);
	}
	while(x > absx){
		stepx = x;
		stepx -= 50;
		x = stepx;
		top.main.scroll(x,y);
		top.main.resizeBy(0,0);
	}
	while(y < absy){
		stepy = y;
		stepy += 30;
		y = stepy;
		top.main.scroll(x,y);
		top.main.resizeBy(0,0);
	}
	while(y > absy){
		stepy = y;
		stepy -= 30;
		y = stepy;
		top.main.scroll(x,y);
		top.main.resizeBy(0,0);
	}
	setxy();
}else {
	while(x < absx){
		stepx = x;
		stepx += 20;
		x = stepx;
		top.main.scroll(x,y);
		top.main.resizeBy(0,0);
	}
	while(x > absx){
		stepx = x;
		stepx -= 20;
		x = stepx;
		top.main.scroll(x,y);
		top.main.resizeBy(0,0);
	}
	while(y < absy){
		stepy = y;
		stepy += 5;
		y = stepy;
		top.main.scroll(x,y);
		top.main.resizeBy(0,0);
	}
	while(y > absy){
		stepy = y;
		stepy -= 5;
		y = stepy;
		top.main.scroll(x,y);
		top.main.resizeBy(0,0);
	}
	setxy();
}
}

// ---------------------------------------------------------------
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);

function MM_findObj(n, d) { //v3.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&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
/* Functions that swaps images. */
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 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;
}

/* Functions that handle preload. */
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; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
// ---------------------------------------------------------------
