/* 得到Cookie返回值*/
function wak_getCookie(name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg) {
			return wak_getCookieVal(j);
		}
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) {
			break;
		}
	}
	return null;
}
function wak_getCookieVal(offset) {
	var endstr = document.cookie.indexOf(";", offset);
	if (endstr == -1) {
		endstr = document.cookie.length;
	}
	return unescape(document.cookie.substring(offset, endstr));
}

var userId = wak_getCookie("USERID");

//得到域名
var getHost = function(url) { 
         var host = "null";
         if(typeof url == "undefined"
                         || null == url)
                 url = window.location.href;
         var regex = /(.*\:\/\/[^\/]*).*/;
         var match = url.match(regex);
         if(typeof match != "undefined"
                         && null != match)
                 host = match[1];
         return host;
}
var host = getHost().substring(7,getHost().indexOf("."));
if(userId != null){
	host = host+"&userId="+userId;
}

/* 利用jQuery跨域方法.getScript()访问 http://localhost:8088/cimm.jsp*/
$(document).ready(function(){ 
	jQuery.getScript("http://resin.51credit.com:8888/cimm.jsp?host="+host, function(){  
		if(sendCookie != null && sendCookie != '' && sendCookie.split(partition).length > 0){
			
			
			//得到拆分字符串后的数组
			var send = sendCookie.split(partition);
			var info = new Array();
			var kind = 0;

			
			for(n=0;n<send.length;n++){
				if(send[n] != ""){
					info[kind] = send[n];
					kind++;
				}

			}

			
			//总条数
			var len = info.length;
			//控制显示第几条
			var num = 0;

			//右下角msn浮出效果
			//var MSG = new CLASS_MSN_MESSAGE("aa",200,120,"短消息提示：","您有1封消息","欢迎光临本站！");  
			//MSG.show(); 
			/**//*  
			*消息构造  
			*/  
			function CLASS_MSN_MESSAGE(id,width,height,caption,title,message,target,action){  
				this.id = id;  
				this.title = title;  
				this.caption= caption;  
				this.message= message;  
				this.target = target;  
				this.action = action;  
				this.width = width?width:290;  
				this.height = height?height:235;  
				this.timeout= 15000000000;  
				this.speed = 20; 
				this.step = 1; 
				this.right = screen.width -1;  
				this.bottom = screen.height; 
				this.left = this.right - this.width; 
				this.top = this.bottom - this.height; 
				this.timer = 0; 
				this.pause = false;
				this.close = false;
				this.autoHide = true;
			}  
			/**//*  
			*隐藏消息方法  
			*/  
			CLASS_MSN_MESSAGE.prototype.hide = function(wi,hei){  
				if(this.onunload()){  
					var offset = this.height>this.bottom-this.top?this.height:this.bottom-this.top; 
					var me = this;  
					if(this.timer>0){   
						window.clearInterval(me.timer);  
					}  
					var fun = function(){  
						if(me.pause==false||me.close){
							var x = me.left; 
							var y = 0; 
							var width = wi; 
							var height = hei; 
							if(me.offset>hei){ 
								height = me.offset; 
							}  
							y  = me.bottom - height; 
							if(y>=me.bottom){ 
								window.clearInterval(me.timer);  
								me.Pop.hide();  
							} else { 
								me.offset = me.offset - me.step;  
							} 
							me.Pop.show(x,y,width,height);    
						}             
					}  
					this.timer = window.setInterval(fun,this.speed)      
				}  
			}  
			/**//*  
			*消息卸载事件，可以重写  
			*/  
			CLASS_MSN_MESSAGE.prototype.onunload = function() {  
				return true;  
			}  
			/**//*  
			*消息命令事件，要实现自己的连接，请重写它  
			*  
			*/  
			CLASS_MSN_MESSAGE.prototype.oncommand = function(url){  
				//this.close = true;
				//this.hide(0,0);  
				window.open(url);
			} 
			/**//*  
			*消息显示方法  
			*/  
			CLASS_MSN_MESSAGE.prototype.show = function(){  
				var oPopup = window.createPopup(); //IE5.5+    
				this.Pop = oPopup;  
				var w = this.width;  
				var h = this.height;
				var t = this.title;  
				var m = this.message;
				var imagePath = 'http://img.51credit.com/cim/image/sinoPopPic/';
				//弹窗最大化窗口样式
				var str = "<table width="+w+" height="+h+" border='0' cellpadding='0' cellspacing='0'>";
					str += "<tr>";
					str += "<td class='bian3' style='border: 2px solid #404040;background-image: url("+imagePath+"tc01.gif);padding-top: 4px;padding-right: 14px;padding-bottom: 14px;padding-left: 14px;'><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
					str += "<tr>";
					str += "<td height='28' valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
					str += "<tr>";
					str += "<td width='77' height='26' background='"+imagePath+"tc02-1.gif'><div align='right' class='text' style='font-size: 12px;line-height: 16px;color: #6C6C6C;padding-top: 2px;'>";
					str += "<div align='center'><img src='"+imagePath+"tc13.gif' width='12' height='10' hspace='4' ><a href='#' style='color: #333333' id='showList'>通知 ("+len+")</a></div>";
					str += "</div></td>";
					str += "<td><a href='#'><img src='"+imagePath+"tc03-1.gif' id='nextInfo' name='Image12' width='68' height='26' border='0'></a></td>";
					str += "<td width='20'><a href='#' ><img src='"+imagePath+"tc04.gif' id='minPic'alt='最小化' name='Image7' width='18' height='18' border='0'></a></td>";
					str += "<td width='18'><a href='#' ><img src='"+imagePath+"tc05.gif' id='btSysClose' alt='关闭' name='Image11' width='18' height='18' border='0'></a></td>";
					str += "</tr>";
					str += "</table></td>";
					str += "</tr>";
					str += "<tr>";
					str += "<td width='258' height='187' class='ditu2' style='background-image: url("+imagePath+"tc14.gif);'><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
					str += "<tr>";
					str += "<td height='137' valign='middle'><table width='80%' border='0' align='center' cellpadding='0' cellspacing='0'>";
					str += "<tr>";
					str += "<td><p class='text-1' style='font-size: 14px;line-height: 18px;color: #333333;font-weight: bold;' id='title'>"+t+"</p>";
					str += "<p class='text' style='font-size: 12px;line-height: 16px;color: #6C6C6C;padding-top: 2px;' id='content'>"+m+"</p></td>";
					str += "</tr>";
					str += "</table></td>";
					str += "</tr>";
					str += "</table></td>";
					str += "</tr>";
					str += "</table></td>";
					str += "</tr>";
					str += "</table>";

                //弹窗最小化窗口样式
				var minStr = "<table width='290' border='0' cellspacing='0' cellpadding='0'>";
					minStr += "<tr>";
					minStr += "<td width='20'><img src='"+imagePath+"tc08.gif' width='20' height='22'></td>";
					minStr += "<td width='63' class='bian-1k' style='background-color: #424242;text-align: left;padding-left: 2px;border-top-width: 1px;border-right-width: 1px;border-bottom-width: 1px;border-top-style: solid;border-right-style: solid;border-bottom-style: solid;border-top-color: #888888;border-right-color: #888888;border-bottom-color: #888888;'<span class='text-bai' style='font-size: 12px;color: #FFFFFF;pad'>通知("+len+")</span></td>";
					minStr += "<td class='background' style='background-image: url("+imagePath+"tc09.gif);overflow: hidden;width: 115px;height: 20px;'><img src='"+imagePath+"tc12.gif' width='5' height='7' hspace='3' ><span class='text' id='showPop' style='font-size: 12px;line-height: 16px;color: #6C6C6C;padding-top: 2px;'><a href='#'style='color:#333333;'>点最大化查看通知</a></span></td>";
					minStr += "<td width='19'><a href='#' ><img src='"+imagePath+"tc10.gif' id='showPop2' alt='最大化' name='Image9' width='19' height='22' border='0'></a></td>";
					minStr += "<td width='3'>&nbsp;</td>";
					minStr += "<td width='64'><a href='#'><img src='"+imagePath+"tc11.gif' id='closePop' alt='关闭' name='Image13' width='18' height='18' border='0'></a></td>";
					minStr += "</tr>";
					minStr += "</table>";
				
				var contentList = "";
				for(i=0;i<info.length;i++){
					if(i < 4){
						contentList +="<a href='#' id = 'clickInfo"+i+"' style='text-decoration: underline;font-size: 12px;line-height: 24px;color: #0000FF;'>·"+info[i].substring(info[i].indexOf(titleName),info[i].indexOf(contentName)).replace(titleName,'').substring(0,14)+"</a><br>";
					}
				}

				//弹窗列表样式
				var listStr = "<table width='290' height='235' border='0' cellpadding='0' cellspacing='0'>";
					listStr +="<tr>";
					listStr +="<td class='bian3' style='border: 2px solid #404040;background-image: url("+imagePath+"tc01.gif);padding-top: 4px;padding-right:14px;padding-bottom:14px;padding-left: 14px;'><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
					listStr +="<tr>";
					listStr +="<td height='28' valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
					listStr +="<tr>";
					listStr +="<td width='77' height='26' background='"+imagePath+"tc02-1.gif'><div align='right' class='text' style='font-size: 12px;line-height: 16px;color: #6C6C6C;padding-top: 2px;'>";
					listStr +="<div align='center'><img src='"+imagePath+"tc13.gif' width='12' height='10' hspace='4'>通知 ("+len+")</div>";
					listStr +="</div></td>";
					listStr +="<td><a href='#' ><img src='"+imagePath+"tc03-1.gif' name='Image14' id='showInfo' width='68' height='26' border='0'></a></td>";
					listStr +="<td width='20'><a href='#' ><img src='"+imagePath+"tc04.gif' id='minPic' alt='最小化' name='Image15' width='18' height='18' border='0'></a></td>";
					listStr +="<td width='18'><a href='#' ><img src='"+imagePath+"tc05.gif' id='closePop' alt='关闭' name='Image16' width='18' height='18' border='0'></a></td>";
					listStr +="</tr>";
					listStr +="</table></td>";
					listStr +="</tr>";
					listStr +="<tr>";
					listStr +="<td width='258' height='187' valign='top' class='ditu' style='background-image: url("+imagePath+"tc14.gif);padding-top: 20px;padding-right: 20px;padding-bottom: 20px;padding-left: 22px;vertical-align: top;height: 187px;width: 258px;'>";
					listStr +="<p class='text' style='font-size: 12px;line-height: 16px;color: #6C6C6C;padding-top: 2px;'>当前通知 ("+len+")</p>";
					listStr +="<table width='85%' border='0' align='center' cellpadding='0' cellspacing='0'>";
					listStr +="<tr>";
					listStr +="<td>";
					listStr +=contentList;
					listStr +="</tr>";
					listStr +="</table></td>";
					listStr +="</tr>";
					listStr +="</table></td>";
					listStr +="</tr>";
					listStr +="</table>";


				oPopup.document.body.innerHTML = str; 

				var minPic = oPopup.document.getElementById("minPic");  
				minPic.onclick = function(){  
					oPopup.document.body.innerHTML = minStr; 
					me.close = true;
					me.hide(290,20); 
					this.timer = window.setInterval(fun,this.speed) 
					var closePop = oPopup.document.getElementById("closePop");  
					closePop.onclick = function(){  
						me.close = true;
						me.hide(0,0);  
					}  
					//this.timer = window.setInterval(fun,this.speed) 
					var showPop = oPopup.document.getElementById("showPop");  
					showPop.onclick = function(){  
						if(num > (len-1)){
							num = len-1;
						}
						var MSG1 = new CLASS_MSN_MESSAGE("aa",290,235,"",info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''),info[num].substring(info[num].indexOf(contentName)).replace(contentName,''),'');  
						MSG1.rect(null,null,null,screen.height-50); 
						MSG1.speed = 10; 
						MSG1.step = 5; 
						me.close = true;
						me.hide(0,0);
						MSG1.show(); 
					}  

					var showPop2 = oPopup.document.getElementById("showPop2");  
					showPop2.onclick = function(){  
						if(num > (len-1)){
							num = len-1;
						}
						var MSG1 = new CLASS_MSN_MESSAGE("aa",290,235,"",info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''),info[num].substring(info[num].indexOf(contentName)).replace(contentName,''),'showList');  
						MSG1.rect(null,null,null,screen.height-50); 
						MSG1.speed = 10; 
						MSG1.step = 5; 
						me.close = true;
						me.hide(0,0);
						MSG1.show(); 
					} 
				}  

				var showList = oPopup.document.getElementById("showList");  
				showList.onclick = function(){  
					oPopup.document.body.innerHTML = listStr; 
					me.close = true;
					me.hide(0,0);
					me.close = true;
					me.hide(290,235); 

					var showInfo = oPopup.document.getElementById("showInfo");  
					showInfo.onclick = function(){  
						num = 0;
						var MSG1 = new CLASS_MSN_MESSAGE("aa",290,235,"",info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''),info[num].substring(info[num].indexOf(contentName)).replace(contentName,''),'');  
						MSG1.rect(null,null,null,screen.height-50); 
						MSG1.speed = 10; 
						MSG1.step = 5; 
						me.close = true;
						me.hide(0,0);
						MSG1.show(); 
					} 


					


					/*
					for(var mm=0;mm < 4;m++){
						var clickInfo = oPopup.document.getElementById("clickInfo"+mm);
						if(clickInfo != null){
							clickInfo.onclick = function(){  
								num = mm;
								var MSG1 = new CLASS_MSN_MESSAGE("aa",290,235,"",info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''),info[num].substring(info[num].indexOf(contentName)).replace(contentName,''),'');  
								MSG1.rect(null,null,null,screen.height-50); 
								MSG1.speed = 10; 
								MSG1.step = 5; 
								me.close = true;
								me.hide(0,0);
								MSG1.show(); 
							}  
						}else{
							break;
						}
					}
					
					*/
					
					var clickInfo0 = oPopup.document.getElementById("clickInfo0");  
					if(clickInfo0 != null){
						clickInfo0.onclick = function(){  
							num = 0;
							var MSG1 = new CLASS_MSN_MESSAGE("aa",290,235,"",info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''),info[num].substring(info[num].indexOf(contentName)).replace(contentName,''),'');  
							MSG1.rect(null,null,null,screen.height-50); 
							MSG1.speed = 10; 
							MSG1.step = 5; 
							me.close = true;
							me.hide(0,0);
							MSG1.show(); 
						} 
					}
	


					var clickInfo1 = oPopup.document.getElementById("clickInfo1");  
					if(clickInfo1 != null){
						clickInfo1.onclick = function(){  
							num = 1;
							var MSG1 = new CLASS_MSN_MESSAGE("aa",290,235,"",info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''),info[num].substring(info[num].indexOf(contentName)).replace(contentName,''),'');  
							MSG1.rect(null,null,null,screen.height-50); 
							MSG1.speed = 10; 
							MSG1.step = 5; 
							me.close = true;
							me.hide(0,0);
							MSG1.show(); 
						}  
					}
				
					var clickInfo2 = oPopup.document.getElementById("clickInfo2");  
					if(clickInfo2 != null){
						clickInfo2.onclick = function(){  
							num = 2;
							var MSG1 = new CLASS_MSN_MESSAGE("aa",290,235,"",info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''),info[num].substring(info[num].indexOf(contentName)).replace(contentName,''),'');  
							MSG1.rect(null,null,null,screen.height-50); 
							MSG1.speed = 10; 
							MSG1.step = 5; 
							me.close = true;
							me.hide(0,0);
							MSG1.show(); 
						} 
					}
					
					var clickInfo3 = oPopup.document.getElementById("clickInfo3");  
					if(clickInfo3 != null){
						clickInfo3.onclick = function(){  
							num = 3;
							var MSG1 = new CLASS_MSN_MESSAGE("aa",290,235,"",info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''),info[num].substring(info[num].indexOf(contentName)).replace(contentName,''),'');  
							MSG1.rect(null,null,null,screen.height-50); 
							MSG1.speed = 10; 
							MSG1.step = 5; 
							me.close = true;
							me.hide(0,0);
							MSG1.show(); 
						}  
					}
					
				
					var closePop = oPopup.document.getElementById("closePop");  
					closePop.onclick = function(){  
						me.close = true;
						me.hide(0,0);  
					}  
					
					var minPic = oPopup.document.getElementById("minPic");  
					minPic.onclick = function(){  
						oPopup.document.body.innerHTML = minStr; 
						me.close = true;
						me.hide(290,20); 
						var showPop = oPopup.document.getElementById("showPop");  
						showPop.onclick = function(){  
							if(num > (len-1)){
								num = len-1;
							}
							var MSG1 = new CLASS_MSN_MESSAGE("aa",290,235,"",info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''),info[num].substring(info[num].indexOf(contentName)).replace(contentName,''),'showList');  
							MSG1.rect(null,null,null,screen.height-50); 
							MSG1.speed = 10; 
							MSG1.step = 5; 
							me.close = true;
							me.hide(0,0);
							MSG1.show(); 
						} 

						var showPop2 = oPopup.document.getElementById("showPop2");  
						showPop2.onclick = function(){  
							if(num > (len-1)){
								num = len-1;
							}
							var MSG1 = new CLASS_MSN_MESSAGE("aa",290,235,"",info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''),info[num].substring(info[num].indexOf(contentName)).replace(contentName,''),'showList');  
							MSG1.rect(null,null,null,screen.height-50); 
							MSG1.speed = 10; 
							MSG1.step = 5; 
							me.close = true;
							me.hide(0,0);
							MSG1.show(); 
						} 
						
						var closePop = oPopup.document.getElementById("closePop");  
						closePop.onclick = function(){  
							me.close = true;
							me.hide(0,0);  
						}  
					}  
				}
				this.offset  = 0; 
				var me  = this;  
				oPopup.document.body.onmouseover = function(){me.pause=true;}
				oPopup.document.body.onmouseout = function(){me.pause=false;}
				var fun = function(){  
					var x  = me.left; 
					var y  = 0; 
					var width  = me.width; 
					var height  = me.height; 
						if(me.offset>me.height){ 
							height = me.height; 
						} else { 
							height = me.offset; 
						} 
					y  = me.bottom - me.offset; 
					if(y<=me.top){ 
						me.timeout--; 
						if(me.timeout==0){ 
							window.clearInterval(me.timer);  
							if(me.autoHide){
								me.hide(); 
							}
						} 
					} else { 
						me.offset = me.offset + me.step; 
					} 
					me.Pop.show(x,y,width,height);    
				}   
				this.timer = window.setInterval(fun,this.speed)      
				var btClose = oPopup.document.getElementById("btSysClose");  
				btClose.onclick = function(){  
					me.close = true;
					me.hide(0,0);  
				}  
				/*
				for(j=0;j<info.length;j++){
					if(info[j].substring(info[j].indexOf(contentName)).replace(contentName,'').length >  info[j].substring(info[j].indexOf(contentName)).replace(contentName,'').replace('openHref','').length){
						alert(oPopup.document.getElementById("openHref"+info[j].substring(info[j].indexOf(idName),info[j].indexOf(titleName)).replace(idName,'')));
						if(oPopup.document.getElementById("openHref"+info[j].substring(info[j].indexOf(idName),info[j].indexOf(titleName)).replace(idName,'')) != null){
							oPopup.document.getElementById("openHref"+info[j].substring(info[j].indexOf(idName),info[j].indexOf(titleName)).replace(idName,'')).onclick = function(){  
								var open = oPopup.document.getElementById("openHref"+info[j].substring(info[j].indexOf(idName),info[j].indexOf(titleName)).replace(idName,'')).href;
								me.oncommand(open);   
							}
						}
					}else{
						alert('这里才对啊！！！');
					}
				}
				*/

				 
				var openHref = oPopup.document.getElementById("openHref");  
				if(openHref!=null){
					openHref.onclick = function(){  
						var url = openHref.href;
						me.oncommand(url); 
					}  
				}

				//this.timer = window.setInterval(fun,this.speed)      
				

				//下一条在这控制，请求道jsp更改cookie中下次显示时间
				
				var nextInfo = oPopup.document.getElementById("nextInfo");  
				nextInfo.onclick = function(){  
					num++;
					if(num > len-1){
						num = 0;
					}
					if(info[num]=="" && num < (len-1)){
						num++;
					}
					$(document).ready(function(){ 
						jQuery.getScript("http://resin.51credit.com:8888/cimm.jsp?nextId="+info[num].substring(info[num].indexOf(idName),info[num].indexOf(titleName)).replace(idName,'')+"&dayCount="+info[num].substring(0,info[num].indexOf(idName)).replace(dayCount,''), function(){ 
						});
					});
					/*   
					var MSG1 = new CLASS_MSN_MESSAGE("aa",290,235,"",info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''),info[num].substring(info[num].indexOf(contentName)).replace(contentName,''),'');  
						MSG1.rect(null,null,null,screen.height-50); 
						MSG1.speed = 10; 
						MSG1.step = 5; 
						me.close = true;
						me.hide(0,0);
						MSG1.show(); 
					*/
					oPopup.document.getElementById("title").innerHTML=info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''); 
					oPopup.document.getElementById("content").innerHTML=info[num].substring(info[num].indexOf(contentName)).replace(contentName,''); 
				
					var openHref = oPopup.document.getElementById("openHref");  
					if(openHref!=null){
						openHref.onclick = function(){  
							var url = openHref.href;
							me.oncommand(url); 
						}  
					}
				}  
					/*
				 var ommand = oPopup.document.getElementById("ommand");  
				  ommand.onclick = function(){  
				   //this.close = true;
				me.hide();  
				window.open(ommand.href);
				}  
				*/
			}  
			/**//* 
			**设置速度方法 
			**/ 
			CLASS_MSN_MESSAGE.prototype.speed = function(s){ 
				var t = 20; 
				try { 
					t = praseInt(s); 
				} catch(e){} 
				this.speed = t; 
			} 
			/**//* 
			**设置步长方法 
			**/ 
			CLASS_MSN_MESSAGE.prototype.step = function(s){ 
				var t = 1; 
				try { 
					t = praseInt(s); 
				} catch(e){} 
				this.step = t; 
			} 
			CLASS_MSN_MESSAGE.prototype.rect = function(left,right,top,bottom){ 
				try { 
					this.left = left!=null?left:this.right-this.width; 
					this.right = right!=null?right:this.left +this.width; 
					this.bottom = bottom!=null?(bottom>screen.height?screen.height:bottom):screen.height; 
					this.top = top!=null?top:this.bottom - this.height; 
				} catch(e){} 
			} 
			var MSG1 = new CLASS_MSN_MESSAGE("aa",290,235,"",info[num].substring(info[num].indexOf(titleName),info[num].indexOf(contentName)).replace(titleName,''),info[num].substring(info[num].indexOf(contentName)).replace(contentName,''),'');  
				MSG1.rect(null,null,null,screen.height-50); 
				MSG1.speed = 10; 
				MSG1.step = 5; 
				MSG1.show();  
			//同时两个有闪烁，只能用层代替了，不过层不跨框架 
			//var MSG2 = new CLASS_MSN_MESSAGE("aa",200,120,"短消息提示：","您有2封消息","希望您能喜欢！");  
			//MSG2.rect(100,null,null,screen.height); 
			//MSG2.show();  
			//-->  

		}
	});
});
function killerrors() { 
	return true; 
} 
window.onerror = killerrors;
