//窗口句柄
var name;
if(!obj.name){
name = "win_" + new Date().getTime();
}else{
name = obj.name;
}
//alert(name);
//是否可以改变窗口大小
var resizable = obj.resizable || "no";
//是否有滚动条
var scrollbars= obj.scrollbars || "yes";
//是否有状态栏
var status = obj.status || "no";
//是否有菜单栏
var menubar = obj.menubar || "no";
//是否有工具栏
var toolbar = obj.toolbar || "no";
//是否有地址栏
var locations = obj.locations || "yes";
return window.open (url,name,"height=" + h + ",width=" + w + ",top=" + t + ",left=" + l + ",toolbar=" + toolbar + ",menubar=" + menubar + ",scrollbars=" + scrollbars + ", resizable=" + resizable + ",location=" + locations + ", status=" + status + ",hotkeys=esc");
}
//模态窗口打开模式的子页面获取父页面对象
function getParent(){
var p = "";
if (window.opener != undefined) {
p = window.opener;
}
else {
p = window.dialogArguments;
};
return p;
}
//模态窗口打开模式的子页面设置returnValue
function setReturnValue(v){
if (window.opener != undefined) {
window.opener.returnValue = v;
}
else {
window.returnValue = v;
};
}
//滑動门
function ScrollDoor(){
this.value = 0;
}
ScrollDoor.prototype = {
onlyMenu : function(menus ,openClass,closeClass){ // コンテンツを持たないメニューのみ
var _this = this;
for(var i = 0 ; i
_this.$ (menus[i]).flag = this.value;
_this.$(menus[i]).value = i;
_this.$(menus[i]).onclick = function(){
for(var j = 0 ; j
_this.$(menus[j]).className = closeClass;
//_this.$(divs[ j]).style.display = "none";
}
_this.$(menus[this.value]).className = openClass;
//_this.$(divs[this.value] ).style.display = "block";
}
}
},
sd : function(menus,divs,openClass,closeClass){// 2 つのクラス
var _this = this ;
if(menus.length != divs.length)
{
alert("菜单层量和内容层量不一样!");
return false;
}
for(var i = 0 ; i
_this.$(menus[i]).flag = this.value;
_this.$(menus[i] ]).value = i;
_this.$(menus[i]).onclick = function(){
for(var j = 0 ; j
{
_this.$(menus[j]).className = closeClass;
_this.$(divs[j]).style.display = "none";
}
_this.$(menus[ this.value]).className = openClass;
_this.$(divs[this.value]).style.display = "block";
}
}
},
sd3class : function(menus,divs,openClass,closeClass,middleClass){ //3 つのクラス
var _this = this;
for(var x = 0 ; ×<メニューの長さ ; x )
{
_this.$(menus[x]).state = _this.$(menus[x]).className == openClass ? "open" : "close";
}
if(menus.length != divs.length)
{
alert("菜单层量和内容层量不一样!");
return false;
}
for(var i = 0 ; i
_this.$(menus[i]).flag = this.value ;
_this.$(menus[i]).value = i;
_this.$(menus[i]).onclick = function(){
for(var j = 0 ; j {
_this.$(menus[j]).className = closeClass;
_this.$(divs[j]).style.display = "none";
_this.$(menus[j]).state = "閉じる";
}
this.state = "開く";
_this.$(menus[this.value]).className = openClass ;
_this.$(divs[this.value]).style.display = "ブロック";
}
_this.$(menus[i]).onmouseover = function(){
//alert(this.state);
for(var j = 0 ; j
if(_this.$(menus[j]).state != "open")
{
_this.$(menus[j]).className = closeClass;
_this.$(menus[j]).state = "close";
}
}
if(this.state == "open")
{
}
else
{
this.className = middleClass;
}
}
_this.$(menus[i]).onmouseout = function(){
if(this.state != "open")
{
this.className = closeClass;
}
}
}
},
$ : function(oid){
if(typeof(oid) == "string")
return document.getElementById(oid);
return oid;
}
}