﻿/*
 * locolc javascript类库
 * 核心继承方式
 * MyClass = locolc.extend(SuperClass, {  })
 * locolc.extend(MyClass, SuperClass, {  })
 */
 
locolc = {
version: '1.0',
layer:new Array(),
layerObject:new Array()
};
//window["undefined"] = window["undefined"];
locolc.apply = function(o, c, defaults){
    if(defaults){    
        locolc.apply(o, defaults);
    }
    if(o && c && typeof c == 'object'){
        for(var p in c){
            o[p] = c[p];
        }
    }
    return o;
};
(function(){
    var idSeed = 0;
    var ua = navigator.userAgent.toLowerCase();
    var isStrict = document.compatMode == "CSS1Compat",
        isOpera = ua.indexOf("opera") > -1,
        isSafari = (/webkit|khtml/).test(ua),
        isSafari3 = isSafari && ua.indexOf('webkit/5') != -1,
        isIE = !isOpera && ua.indexOf("msie") > -1,
        isIE7 = !isOpera && ua.indexOf("msie 7") > -1,
        isGecko = !isSafari && ua.indexOf("gecko") > -1,
        isBorderBox = isIE && !isStrict,
        isWindows = (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1),
        isMac = (ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1),
        isAir = (ua.indexOf("adobeair") != -1),
        isLinux = (ua.indexOf("linux") != -1),
        isSecure = window.location.href.toLowerCase().indexOf("https") === 0;  
	if(isIE && !isIE7){
        try{
            document.execCommand("BackgroundImageCache", false, true);
        }catch(e){}
    }
    locolc.apply(locolc, {
		namespace : function(){
            var a=arguments, o=null, i, j, d, rt;
            for (i=0; i<a.length; ++i) {
                d=a[i].split(".");
                rt = d[0];
                eval('if (typeof ' + rt + ' == "undefined"){' + rt + ' = {};} o = ' + rt + ';');
                for (j=1; j<d.length; ++j) {
                    o[d[j]]=o[d[j]] || {};
                    o=o[d[j]];
                }
            }
        },
        extend : function(){
            
            var io = function(o){
                for(var m in o){
                    this[m] = o[m];
                }
            };
            var oc = Object.prototype.constructor;
            
            return function(sb, sp, overrides){
                if(typeof sp == 'object'){
                    overrides = sp;
                    sp = sb;
                    sb = overrides.constructor != oc ? overrides.constructor : function(){sp.apply(this, arguments);};
                }
                var F = function(){}, sbp, spp = sp.prototype;
                F.prototype = spp;
                sbp = sb.prototype = new F();
                sbp.constructor=sb;
                sb.superclass=spp;
                if(spp.constructor == oc){
                    spp.constructor=sp;
                }
                sb.override = function(o){
                    locolc.override(sb, o);
                };
                sbp.override = io;
                locolc.override(sb, overrides);
                return sb;
            };
        }(),
        override : function(origclass, overrides){
            if(overrides){
                var p = origclass.prototype;
                for(var method in overrides){
                    p[method] = overrides[method];
                }
            }
        },   
        isOpera : isOpera,        
        isSafari : isSafari,      
        isSafari3 : isSafari3,
        isSafari2 : isSafari && !isSafari3,
        isIE : isIE,
        isIE6 : isIE && !isIE7,
        isIE7 : isIE7,
        isGecko : isGecko,
        isBorderBox : isBorderBox,
        isLinux : isLinux,
        isWindows : isWindows,
        isMac : isMac,
        isAir : isAir
    });
	locolc.ns = locolc.namespace;
})();
locolc.ns("locolc", "locolc.ajax","locolc.element","locolc.extend","locolc.form","locolc.widgets","locolc.formBase");
Object.extend = function(destination, source) {
  for (var property in source) {
    destination[property] = source[property];
  }
  return destination;
}
/*
Javascript内置对象属性拓展
*/
String.prototype.trim = function(){//添加去空格方法
    var re = /^\s+|\s+$$$/g;
    return function(){ return this.replace(re, ""); };
}();
Object.extend(String.prototype, {
    toJSON:function()
	{
		try {
		return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
		this.replace(/"(\\.|[^"\\])*?"/g, ''))) && 
		eval('(' + this + ')');    }
		catch (e) 
		{ 
		return false; 
		}
	}
});
/*
文档元素对象Dom操作
*/
function $$$(element)
{
	var e=document.getElementById(element);
	if(e==null)throw element;
	Object.extend(e, {
	Class:function(css)
	{
		this.className=css;
	},
	Display:function(b)//设置是否显示
	{
		if(b==false || b=="false")b="none";
		this.style.display=b.toString();
	},
	setWidth:function(w)
	{
		this.style.width=w+"px";
	},
	setHeight:function(h)
	{
		this.style.height=h+"px";
	},
	getWidth:function()
	{
		return this.clientWidth != 0 ? this.clientWidth : this.offsetWidth;
	},
	getHeight:function()
	{
		return this.clientHeight != 0 ? this.clientHeight : this.offsetHeight;
	},
	setBgColor:function(color)
	{
		this.style.backgroundColor=color;
	},
	setBgImage:function(url)
	{
		this.style.backgroundImage="url("+url+")";   
	},
	HTML:function(html)
	{
		this.innerHTML=html;
	},
	/*以下全是移动效果*/
	sildeDown:function(px,width,height,_callback)
	{	
		this.style.overflow="hidden";
		var obj=this;
		var timeSildeDown=setInterval(function(){
						try{		  
		if((parseInt($$$(obj.id).getHeight())-px)>=height)
		{
			obj.style.height=parseInt($$$(obj.id).getHeight()-px)+"px";
		}
		else
		{
			
			obj.style.height=height+"px";	
		}
		if((parseInt($$$(obj.id).getWidth())-px)>=width)
		{
			obj.style.width=parseInt($$$(obj.id).getWidth())-px+"px";
		}
		else
		{
			obj.style.width=width+"px";	
		}
		if(obj.style.width==width+"px" && obj.style.height==height+"px")
		{
		clearInterval(timeSildeDown);
		_callback();
		}
		}catch(e){clearInterval(timeSildeDown);}
		},5);
		
	},
	sildeUp:function(px,width,height,_callback)
	{
		this.style.overflow="hidden";
		var obj=this;
		var timeSildeUp=setInterval(function(){	
		try
		{
		if((parseInt($$$(obj.id).getHeight())+px)<=height)
		{
			obj.style.height=(parseInt($$$(obj.id).getHeight())+px)+"px";
		}
		else
		{
			obj.style.height=height+"px";
		}
		if((parseInt($$$(obj.id).getWidth())+px)<=width)
		{
			obj.style.width=(parseInt($$$(obj.id).getWidth())+px)+"px";
		}
		else
		{
			obj.style.width=width+"px";	
		}
		if(obj.style.width==width+"px" && obj.style.height==height+"px")
		{
		clearInterval(timeSildeUp);
		_callback();
		}
		}catch(e){clearInterval(timeSildeUp);}
		},10);
		
	},
	opacityDown:function(o,_callback)
	{
		var opacity=100;
		var obj=this;
		timeRemove=setInterval(function(){
		opacity=opacity-o;
		obj.style.filter="alpha(opacity="+opacity+")";	
		if(opacity==0)
		{
		    _callback();
			clearInterval(timeRemove);
		}
		},20);
	},
	opacityUp:function(o,_callback)
	{
		var opacity=50;
		var obj=this;
		timeRemove=setInterval(function(){
		opacity=opacity+o;
		obj.style.filter="alpha(opacity="+opacity+")";	
		if(opacity>=100)
		{
		    _callback();
			clearInterval(timeRemove);
		}
		},80);
	},
	remove:function(o)
	{
		var opacity=100;
		var obj=this;
		timeRemove=setInterval(function(){
		opacity=opacity-o;
		obj.style.filter="alpha(opacity="+opacity+")";	
		if(opacity<=0)
		{
			clearInterval(timeRemove);
			locolc.element.remove(obj);
		}
		},20);
		//this.style.-moz-opacity
		//locolc.element.remove(this);
	}
	
	});
return e;
}
locolc.element={
	create:function(tag)
	{
		return document.createElement(tag);
	},
	add:function(a,b)
	{
		a.appendChild(b);	
	},
	remove:function(o)
	{
		var object=$$$.isIE?o.parentElement:o.parentNode;
		object.removeChild(o);
	}
}
/*
Ajax基本操作方法
*/
locolc.ajax={
	send:function(_url,_content,_callback,_method,_isasync){
		var _req=!!0;
	try{
		_req=new XMLHttpRequest
		}
	catch(e){
		try{
			_req=new ActiveXObject("MSXML2.XMLHTTP")
			}
		catch(e2){
			try{
				_req=new ActiveXObject("Microsoft.XMLHTTP")
				}
			catch(e3){
				_req=false
				}
			}
		};
	if(!_req)return;
		var Url=_url||"";
		var Content=_content||"";
		var Callback=_callback||function(o){alert(o.ResponseText)};
		var Method=_method||"GET";
		var IsAsync=_isasync==null?true:_isasync;
		_req.open(Method,Url,IsAsync);
		if(Method=="POST")_req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		_req.onreadystatechange=function(){
			if(_req.readyState==4){
				Callback(_req.status==200?_req:null)
				}
			};
		_req.send(Method=="POST"?Content:"")
	},
	get:function(_url,_callback){
		var p=(_url.indexOf("?")<0)?("?Random="+Math.random()):("&Random="+Math.random());
		locolc.ajax.send(_url+p,"",_callback,"GET");
	},
	post:function(_url,_content,_callback){
		var p=(_url.indexOf("?")<0)?("?Random="+Math.random()):("&Random="+Math.random());
		locolc.ajax.send(_url+p,_content,_callback,"POST")
	},
	getAjaxBar:function(id)
	{
		
		$$$(id).HTML("<div style=\"width:300px;height:25px;text-align:center;margin:0 auto;padding-top:200px\">正在下载数据...</div><div style=\"width:300px;text-align:center;margin:0 auto;\"><img src=\"Javascript/Lib/Images/Loading.gif\" /></div>");
	}
};

locolc.widgets=function(id,title,width,height)
{
	this.id=id;
	this.title=title;
	this.width=width;
	this.height=height;
	this.drag=false;
	this.BG1=false;
	this.BG2=false;
	this.nowPage=0;
	this.resultCount=0;
	this.pageSize=0;
	this.barSize;
	this.pageCSS1="";
	this.pageCSS2="";
	this.pageCSS3="";
	this.panel="";
	this.isDrag=false;
	this.isClose=true;
	this.layerType=0;
	this.initLayer=function(main,border,isdrag,isclose,layertype)
	{
		this.BG1=main;
		this.BG2=border;
		this.isDrag=isdrag;
		this.isClose=isclose;
		this.layerType=layertype
	};
	this.initPager=function(panel,pagesize,resultcount,barsize,css1,css2,css3)
	{
		this.nowPage=parseInt((window.location.toString().split("page=")[1]==undefined)?"1":window.location.toString().split("page=")[1]);
		this.pageSize=pagesize;
		this.resultCount=resultcount;
		this.barSize=barsize;
		this.pageCSS1=css1;
		this.pageCSS2=css2;
		this.pageCSS3=css3;
		this.panel=panel;
	}
}
locolc.pager=locolc.extend(locolc.widgets,{
	create:function()
	{
		CSS1=this.pageCSS1;
		CSS2=this.pageCSS2;
		CSS3=this.pageCSS3;
		var url=window.location.toString();
		if(url.indexOf("?")==-1)
		{
			url=url+"?";
		}
		else
		{
			url=window.location.toString().split("page=")[0];
			if(url.substring(url.length-1,url.length)!="&")
			{
				url=url+"&";
			}
		}
		var totalPage=parseInt(this.resultCount/this.pageSize)+((this.resultCount%this.pageSize>0)?1:0);
		var ul= locolc.element.create("ul");
		locolc.element.add($$$(this.panel),ul);
		ul.className="Pager";
		
		if(this.nowPage!=1)
		{
			li= locolc.element.create("li");
			locolc.element.add(ul,li);
			li.className=this.pageCSS1;
			li.onmouseover=function(){this.className=CSS3;}
			li.onmouseout=function(){this.className=CSS1;}
			li.innerHTML="<a href='"+url+"page=1' >首页</a>";
		
			li= locolc.element.create("li");
			locolc.element.add(ul,li);
			li.className=this.pageCSS1;
			li.onmouseover=function(){this.className=CSS3;}
			li.onmouseout=function(){this.className=CSS1;}
			li.innerHTML="<a href='"+url+"page="+(this.nowPage-1)+"' >上一页</a>";
		}
			for(var i=this.nowPage-this.barSize;i<=this.nowPage+this.barSize;i++)
			{
				if(i>0 && i<=totalPage)
				{
					var li= locolc.element.create("li");
					locolc.element.add(ul,li);
					li.className=this.pageCSS1;
					li.onmouseover=function(){this.className=CSS3;}
					li.onmouseout=function(){this.className=CSS1;}
					if(this.nowPage==i)
					{
					li.className=this.pageCSS2;
					li.onmouseover=function(){this.className=CSS3;}
					li.onmouseout=function(){this.className=CSS2;}
					}
					li.innerHTML="<a href='"+url+"page="+i+"' >"+i+"</a>";
				}
			}
		if(this.nowPage!=totalPage)
		{
			li= locolc.element.create("li");
			locolc.element.add(ul,li);
			li.className=this.pageCSS1;
			li.onmouseover=function(){this.className=CSS3;}
			li.onmouseout=function(){this.className=CSS1;}
			li.innerHTML="<a href='"+url+"page="+(this.nowPage+1)+"' >下一页</a>";
			li= locolc.element.create("li");
			locolc.element.add(ul,li);
			li.className=this.pageCSS1;
			li.onmouseover=function(){this.className=CSS3;}
			li.onmouseout=function(){this.className=CSS1;}
			li.innerHTML="<a href='"+url+"page="+totalPage+"' >尾页</a>";
		}
			/*
			li= locolc.element.create("li");
			locolc.element.add(ul,li);
			li.className=this.pageCSS2;
			li.onmouseover=function(){this.className=CSS3;}
			li.onmouseout=function(){this.className=CSS2;}
			li.innerHTML="共["+totalPage+"]页 共["+this.resultCount+"]条记录";
			*/
	}
});
locolc.layer = locolc.extend(locolc.widgets, {
    dom:null,
	create:function(openStyle)
	{
		locolc.layer[this.id]=this;
		if(this.BG1 && document.getElementById("BGWindow")==null)
		{
			var BGWindow= locolc.element.create("div");	
 			BGWindow.id ="BGWindow";
 			BGWindow.className="BGWindow";
			locolc.element.add(document.body,BGWindow);
 			$$$("BGWindow").setWidth(document.documentElement.clientWidth);
 			$$$("BGWindow").setHeight(document.body.clientHeight);
		}
		if(this.BG2)
		{
			var BG=locolc.element.create("div");
			BG.id=this.id+"LayerBG";
			locolc.element.add(document.body,BG);
			$$$(this.id+"LayerBG").setWidth(this.width+12);
			$$$(this.id+"LayerBG").setHeight(this.height+12);
			$$$(this.id+"LayerBG").Class("LayerBG");
			$$$(this.id+"LayerBG").style.zIndex=999;
			$$$(this.id+"LayerBG").style.top=(document.documentElement.scrollTop+((document.documentElement.clientHeight != 0 ? document.documentElement.clientHeight : document.documentElement.offsetHeight)-$$$(this.id+"LayerBG").offsetHeight)/2)+"px";
			$$$(this.id+"LayerBG").style.left=(document.documentElement.scrollLeft+((document.documentElement.clientWidth != 0 ? document.documentElement.clientWidth : document.documentElement.offsetWidth)-$$$(this.id+"LayerBG").offsetWidth)/2)+"px";
		   $$$(this.id+"LayerBG").innerHTML="<iframe frameborder=\"0\" style=\"width:"+(this.width+12)+"px;height:"+(this.height+12)+";border:0px;filter: alpha(opacity=30); -moz-opacity: 0.30;opacity: 0.30; -khtml-opacity: 0.30;\"></iframe>";
		  // alert("<iframe frameborder=\"0\" width=\""+this.width+12+"\" height=\""+(this.height+12)+"\"></iframe>");
		}	
		var Main=locolc.element.create("div");
		Main.id=this.id;
		locolc.element.add(document.body,Main);
		$$$(this.id).setWidth(this.width);
		$$$(this.id).setHeight(this.height);
		$$$(this.id).Class("LayerMain");
		$$$(this.id).style.zIndex=999;
		$$$(this.id).style.top=(document.documentElement.scrollTop+((document.documentElement.clientHeight != 0 ? document.documentElement.clientHeight : document.documentElement.offsetHeight)-$$$(this.id).offsetHeight)/2)+"px";
		$$$(this.id).style.left=(document.documentElement.scrollLeft+((document.documentElement.clientWidth != 0 ? document.documentElement.clientWidth : document.documentElement.offsetWidth)-$$$(this.id).offsetWidth)/2)+"px";
		
		var Top=locolc.element.create("div");
		Top.id=this.id+"Top";
		locolc.element.add(Main,Top);	
		$$$(this.id+"Top").setWidth(this.width);
		$$$(this.id+"Top").setHeight(26);
		$$$(this.id+"Top").Class("LayerTop");
		var html="<div id=\""+this.id+"TopBar\" class=\"LayerTopBar\" style=\"width:"+(this.width-50)+"\">"+this.title+"</div>";
		if(this.isClose)
		{
			html=html+"<div class=\"LayerClose\" onclick=\"locolc.layer['"+this.id+"'].remove();\">关闭</div>";	
		}
		$$$(this.id+"Top").HTML(html);
		var Content=locolc.element.create("div");
		Content.id=this.id+"Content";
		locolc.element.add(Main,Content);
		$$$(this.id+"Content").setWidth(this.width);
		$$$(this.id+"Content").setHeight(this.height-26);
		$$$(this.id+"Content").Class("LayerContent");	
		if(this.isDrag)
		{
			var TopBar=$$$(this.id+"TopBar");
			$$$(this.id+"TopBar").setWidth($$$(this.id).getWidth()-60);
		$$$(this.id+"TopBar").onmousedown=function(a){
		var d=document;if(!a)a=window.event;
		var x=a.layerX?a.layerX:a.offsetX+3,y=a.layerY?a.layerY:a.offsetY+3;
		if($$$(this.id).setCapture)
			$$$(this.id).setCapture();
		else if(window.captureEvents)
			window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
		if(!a.pageX)a.pageX=a.clientX;
			if(!a.pageY)a.pageY=a.clientY;
		var tx=a.pageX-x,ty=locolc.isIE?(a.pageY-y+document.documentElement.scrollTop):(a.pageY-y);	
		div=new locolc.moveWindow();
		div.create(tx,ty,Main.style.width,Main.style.height);	
		OpointX=tx;
		OpointY=ty;
		d.onmousemove=function(a){
			if(!a)a=window.event;
			if(!a.pageX)a.pageX=a.clientX;
			if(!a.pageY)a.pageY=a.clientY;
			var tx=a.pageX-x,ty=locolc.isIE?(a.pageY-y+document.documentElement.scrollTop):(a.pageY-y);	
			MoveX=OpointX-tx;
			MoveY=OpointY-ty;
			$$$("locolcMoveWindow").style.left=parseInt($$$("locolcMoveWindow").style.left.substring(0,$$$("locolcMoveWindow").style.left.length-2))-MoveX+"px";
			$$$("locolcMoveWindow").style.top=parseInt($$$("locolcMoveWindow").style.top.substring(0,$$$("locolcMoveWindow").style.top.length-2))-MoveY+"px";
			OpointX=tx;OpointY=ty;		
		};	
		d.onmouseup=function(){
		if(TopBar.releaseCapture)
				TopBar.releaseCapture();
			else if(window.captureEvents)
				window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
				
			BG.style.left=(parseInt($$$("locolcMoveWindow").style.left.substring(0,$$$("locolcMoveWindow").style.left.length-2))-5)+"px";
			BG.style.top=(parseInt($$$("locolcMoveWindow").style.top.substring(0,$$$("locolcMoveWindow").style.top.length-2))-5)+"px";
			Main.style.left=$$$("locolcMoveWindow").style.left;
			Main.style.top=$$$("locolcMoveWindow").style.top;
			locolc.element.remove($$$("locolcMoveWindow"))
			d.onmousemove=null;
			d.onmouseup=null;	
		};	
		}
		_width=this.width;
		_height=this.height;
		var ID=this.id;
		this.open(ID,_width,_height,openStyle);
		}
		
		
		
		
	},
	open:function(id,width,height,openstyle)
		{
			if(openstyle==1)
			{
			$$$(id).sildeDown(50,11,11,function(b){
			$$$(id).opacityUp(20);
			$$$(id).sildeUp(20,_width,_height,function(e){})
			});
			$$$(id+"LayerBG").sildeDown(50,23,23,function(b){
			$$$(id+"LayerBG").sildeUp(20,_width+12,_height+12,function(e){})
			});
			}
			if(openstyle==2)
			{
			
			$$$(id+"LayerBG").sildeDown(50,_width+12,7,function(b){
			$$$(id+"LayerBG").sildeUp(25,_width+12,_height+12,function(e){})
			});
			$$$(id).sildeDown(50,_width,1,function(b){
			$$$(id).opacityUp(20);
			$$$(id).sildeUp(20,_width,_height,function(e){})
			});
			}
	},
	remove:function()
	{
		locolc.element.remove($$$(this.id));
		locolc.openChatWindow=locolc.openChatWindow.replace("|"+this.id+"|","|");
		try{
		locolc.element.remove($$$(this.id+"LayerBG"));
		locolc.element.remove($$$("BGWindow"));
		}catch(e){}
	},
	insertIframe:function(url)
	{
	
		var Iframe=locolc.element.create("iframe");
		Iframe.id=this.id+"Iframe";
		Iframe.name=this.id+"Iframe";
		
		Iframe.src=url;
		
		Iframe.setAttribute("frameborder", "0", 0); 
		locolc.element.add($$$(this.id+"Content"),Iframe);
		var ua = navigator.userAgent.toLowerCase();
		
		if(ua.indexOf("msie") > -1)
		{
			Iframe.style.height=$$$(this.id+"Content").clientHeight+"px";
		}
		else
		{
		    Iframe.style.height=$$$(this.id+"Content").style.height;
		}
		
		Iframe.style.width=$$$(this.id+"Content").clientWidth+"px";		
		Iframe.scrolling="no";
	},
	insertHTML:function(content)
	{
		$$$(this.id+"Content").HTML(content);
	},
	getAjax:function(url)
	{
		var tempContent=$$$(this.id+"Content");
		var height=($$$(this.id+"Content").getHeight()-25)/2;
		
		tempContent.innerHTML="<div style=\"text-align:center;padding-top:"+height+"px;\"><img src=\"javascript/lib/images/loading.gif\" /></div>";
		locolc.ajax.get(url,function(o){
		var ajaxTime=setTimeout(function(){
		//tempContent.innerHTML=o.responseText;
		clearTimeout(ajaxTime);
		},1000);
		});
	}
})
locolc.moveWindow=function()
{
	this.create=function(left,top,width,height)
	{
		left=left.toString();
		top=top.toString();
		Window = locolc.element.create("div");
		Window.id = "locolcMoveWindow";
		Window.className="MoveWindow";
		Window.style.zIndex=999;
		Window.style.left=locolc.isIE?left:(left.indexOf("px")>0?left:left+"px");	
		Window.style.top=locolc.isIE?top:(top.indexOf("px")>0?top:top+"px");
		Window.style.width=width;
		Window.style.height=height;
		document.body.appendChild(Window);
		
	}
	
}
locolc.ieContent="<html><style type=text/css>body{font-size:12px;word-break:break-all;overflow:scroll;overflow-x: hidden;overflow-x: auto !important;margin:0px;background-color:#ffffff;margin:5px;SCROLLBAR-FACE-COLOR: #AEADAD;SCROLLBAR-HIGHLIGHT-COLOR: #AEADAD;SCROLLBAR-SHADOW-COLOR: #706F6F;SCROLLBAR-3DLIGHT-COLOR: #cccccc;SCROLLBAR-ARROW-COLOR: #706F6F;SCROLLBAR-TRACK-COLOR: #EFEEEE;SCROLLBAR-DARKSHADOW-COLOR: #cccccc;SCROLLBAR-BASE-COLOR: #FFF;}p{margin-bottom:-18px;}</style><body ></body></html>";
locolc.ffContent="<html><style type=text/css>body{font-size:12px;word-break:break-all;overflow:scroll;overflow-x: hidden;overflow-x: auto !important;margin:0px;background-color:#ffffff;margin:5px;}p{margin-bottom:-13px;}iframe{margin-top:20px;}</style><body ></body></html>";
locolc.openChatWindow="|";

function openwin(url, id, title, width, height) {
        if (!document.getElementById(id)) {
            layer = new locolc.layer(id, title, width, height);
            layer.initLayer(true, true, true, true);
            layer.create();
            layer.insertIframe(url);
        }
    }
