// JavaScript Document

function popUp(url) {
	sealWin=window.open(url,"vsingn",'toolbar=0,location=1,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
	self.name = "Mframe"; 
}



function lib_bwcheck(){ //Browsercheck (needed)
        this.ver=navigator.appVersion
        this.agent=navigator.userAgent
        this.dom=document.getElementById?1:0
        this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0
        this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
        this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
        this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
        this.ie=this.ie4||this.ie5||this.ie6
        this.mac=this.agent.indexOf("Mac")>-1
        this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
        this.ns4=(document.layers && !this.dom)?1:0;
        this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
        return this
}


//ChangeText object constructor.
function makeChangeTextObj(obj){
        this.css = bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;      
        this.writeref = bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;    
        this.writeIt = b_writeIt;                                       
}
function b_writeIt(text,num){
        if (bw.ns4){
                this.writeref.write(text)
                this.writeref.close()
        }
    else this.writeref.innerHTML = messages[num]
}

//The mouoseover function. Calls the writeIt method to write the text to the div.
function changeText(num){

messages=new Array()
messages[1]="<img src='/top/images/promenu_sozaijiten.jpg'>"
messages[2]="<img src='/top/images/promenu_ichiban.jpg'>"
messages[3]="<img src='/top/images/promenu_sozaijitenr.jpg'>"
messages[4]="<img src='/top/images/promenu_wanoirodori.jpg'>"
messages[5]="<img src='/top/images/promenu_imagebook.jpg'>"
messages[6]="<img src='/top/images/promenu_fontwire.jpg'>"
messages[7]="<img src='/top/images/promenu_template.jpg'>"
messages[8]="<img src='/top/images/promenu_etc.jpg'>"

        if(bw.bw) oMessage.writeIt(messages[num], num)
}

//The init function. Calls the object constructor and initiates some properties.
function changeTextInit(){
/****
Variables to set 
****/
msgFont= "MSP Gothic,Osaka" // The font for the message
msgFontSize= 12                         // Set the fontSize in px
msgFontColor="#000000"          // Set the fontColor
msgWidth= "52"                 // Set the width of the messageblock here for netscape 4


        //Fixing the browsercheck for opera... this can be removed if the browsercheck has been updated!!
        bw.opera5 = (navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?true:false
        if (bw.opera5) bw.ns6 = 0
        
        oMessage = new makeChangeTextObj('divMessage')
//        oLinks = new makeChangeTextObj('divLinks')
        //Setting the style properties of the text layer.
        if(bw.dom || bw.ie4){
                with(oMessage.writeref.style){fontFamily=msgFont; fontSize=msgFontSize+"px"; color=msgFontColor}

		}
		
        //Both layers are hidden by default to prevent users from mousing over them and creating errors while the page loads.
        oMessage.css.visibility= "visible"
     //   oLinks.css.visibility= "visible"
}
