//------------------START-----------------基本功能-----------------------------

/*
 * 给定ID返回该ID的对象
 */
function id(id){
    return document.getElementById(id);
}


/*
 * 给定ID返回该ID对象的value
 */
function idvalue(id){
    return document.getElementById(id).value;
}

/*
 * 给定NAME返回该NAME的对象
 */
function name(name){
    return document.getElementsByName(name)[0];
}

/*
 * 给定NAME返回该NAME的对象的value
 */
function namevalue(name){
    return document.getElementsByName(name)[0].value;
}


function idname(id_name){
    var idobj = id(id_name);
    var nameobj = name(id_name);    
    if (!(idobj == null || idobj == "undefined")) {
        return idobj;
    }
    else {
        return nameobj;
    }
}

function setvalue(id_name, value){
    
	idname(id_name).value=value;
}

/*
 * 给定NAME返回该NAME的对象数组
 */
function names(name){
    return document.getElementsByName(name);
}



function show(id_name){	
	if(isNull(id_name)){	
		return;
	}else{
    	return idname(id_name).style.display = 'block';
    }
}

function hide(id_name){
	if(isNull(id_name)){
		return;
	}else{
    	return idname(id_name).style.display = 'none';
    }
}
function isNull(id_name){
	var obj=idname(id_name);  
    if((obj ==undefined)||(obj == "undefined") || (obj == null)){
			return true;
	}else{
		return false;
	}  
}

function writeDebug(msg) {
	var o = document.getElementById('debugContainer');
	if (!o) return false;  // alert("sssss");
	msg="<XMP>"+msg+"</XMP>";
	var d = document.createElement('div');
	d.innerHTML = msg;
	o.appendChild(d);
}
//writeDebug('soundManager.play');



function setCookieSimp(name, value, expires){

    var path = "/";
    var domain = "";
    var secure = "";
    var today = new Date();
    today.setTime(today.getTime());
    if (expires) {
        expires = expires * 1000 * 60 * 60 * 24;
    }
    var expires_date = new Date(today.getTime() + (expires));
    document.cookie = name + '=' + escape(value) +
    ((expires) ? ';expires=' + expires_date.toGMTString() : '') + //expires.toGMTString()     
    ((path) ? ';path=' + path : '') +
    ((domain) ? ';domain=' + domain : '') +
    ((secure) ? ';secure' : '');
}


function appendCookie(name, value, expires){

    var path = "/";
    var domain = "";
    var secure = "";
    var today = new Date();
    today.setTime(today.getTime());
    if (expires) {
        expires = expires * 1000 * 60 * 60 * 24;
    }
    
    var value2 = getCookie(name);    
    value = value2 + "," + value;
    
    var expires_date = new Date(today.getTime() + (expires));
    document.cookie = name + '=' + escape(value) +
    ((expires) ? ';expires=' + expires_date.toGMTString() : '') + //expires.toGMTString()     
    ((path) ? ';path=' + path : '') +
    ((domain) ? ';domain=' + domain : '') +
    ((secure) ? ';secure' : '');
}



function getCookie(name){
    var start = document.cookie.indexOf(name + "=");
    var len = start + name.length + 1;
    if ((!start) && (name != document.cookie.substring(0, name.length))) {
        return null;
    }
    if (start == -1) 
        return null;
    var end = document.cookie.indexOf(';', len);
    if (end == -1) 
        end = document.cookie.length;
    return unescape(document.cookie.substring(len, end));
}

function deleteCookie(name){
	var path = "/";
    var domain = "";
    var secure = "";	
    if (getCookie(name)) 
        document.cookie = name + '=' + ((path) ? ';path=' + path : '') + ((domain) ? ';domain=' + domain : '') + ';expires=Thu, 01-Jan-1970 00:00:01 GMT';
}














//postList.js

function Css(href){
    this.href = href;
}
Css.prototype.createCss = function(){     
    var css = document.createElement('link');
	css.rel = 'stylesheet';
	css.href = this.href;
	css.type = 'text/css';
    return css;
}
function Js(src){
    this.src = src;
}
Js.prototype.createJs = function(){     
    var js = document.createElement('script');
	js.type='text/javascript';
	js.src=this.src;
    return js;
}

function appendCss_Js_One(){
 	document.getElementsByTagName('head')[0].appendChild(new Js("/style/printHtml.js").createJs()); 	
	document.getElementsByTagName('head')[0].appendChild(new Css("/css/bbscss.css").createCss());
	document.getElementsByTagName('head')[0].appendChild(new Js("/style/feedback.js").createJs()); 
	document.getElementsByTagName('head')[0].appendChild(new Js("/style/shCore_zh_CN.js").createJs()); 
	document.getElementsByTagName('head')[0].appendChild(new Js("/style/shBrushAll.js").createJs());
	document.getElementsByTagName('head')[0].appendChild(new Js("/js/framework.js").createJs());		
	document.getElementsByTagName('head')[0].appendChild(new Css("/style/feedback.css").createCss());	
	document.getElementsByTagName('head')[0].appendChild(new Css("/style/SyntaxHighlighter.css").createCss());	
	document.getElementsByTagName('head')[0].appendChild(new Js("/style/post.js").createJs()); 	
}
function appendCss_Js_Two(){	
	document.getElementsByTagName('head')[0].appendChild(new Js("/dwr/interface/commonDwrAction.js").createJs()); 
	document.getElementsByTagName('head')[0].appendChild(new Js("/dwr/engine.js").createJs()); 
	document.getElementsByTagName('head')[0].appendChild(new Js("/dwr/util.js").createJs());	
}
function append_Js_Dwr(){	
	document.getElementsByTagName('head')[0].appendChild(new Js("/dwr/interface/commonDwrAction.js").createJs()); 
	document.getElementsByTagName('head')[0].appendChild(new Js("/dwr/engine.js").createJs()); 
	document.getElementsByTagName('head')[0].appendChild(new Js("/dwr/util.js").createJs());
}


function submitReply(){
	var str=document.getElementById("message").value;    
    var i=str.length;   
    var j=6000-i;
    if (j<=0){   
  		window.alert("您输入的文件太长，超出长度:"+(i-6000)+"个字符");  
  		return  false;   
 	} 	
 	 if(i<2){ 	
 		alert("请输入贴子内容！");
 		return false;
 	} 	
	commonDwrAction.isLogon(isLogonHander);	
} 
function isLogonHander(isLogon){
	if(isLogon==true){
		document.getElementById("submitNewReply").onclick =function(){alert('请勿重复提交!');return false;};
		post.submit();
	}else{
		GSFN2.show();
	}
}
function logOut() {
 	commonDwrAction.logOut(logOutHander); 
}
function logOutHander(flat){
	if(flat==true){		
		location.reload();
	}else{
		alert("退出失败");	
	}
}

function isLogon_staticHtmlHander(map){
	var flat=map.flat;
	if(flat==true){
		$("userLogon").innerHTML="欢迎您："+map.usercd+" &nbsp;&nbsp; <A href='javascript:logOut();'>退出</A>";		
	}else{
		$("userLogon").innerHTML="<A href='javascript:GSFN2.show();'>登录/注册</A>";	
	}	
}
//调用dwr生成该贴子的分页HTML
function postListPaginate_staticHtmlHander(map){
	var start=map.start;
	var end=map.end;
	var totalPage=map.totalPage;
	var currentPage=map.currentPage;
	var topicid=map.topicid;
	
	var currentPageNext=currentPage+1;
	var currentPagePre=currentPage-1;
	
	var currentPageNextTen=currentPage+10;
	var currentPagePreTen=currentPage-10;	

	var str;
	if(currentPage<=11){
		str="<img style='CURSOR: pointer' src='/style/button1_16.gif' title='前10页' onclick='' />\n";	
	}else{
		str="<img style=\'CURSOR: pointer\' src=\'\/style\/button1_16.gif\' title=\'前10页\' onclick=\"javascript:window.location.href=\'\/topics\/"+topicid+"-"+currentPagePreTen+".html\'\" \/>\n";
	}	
	if(currentPage==1){
		str=str+"<img style='CURSOR: pointer' src='/style/button1_18.gif' title='上一页' onclick='' />\n";	
	}else{	
		str=str+"<img style=\'CURSOR: pointer\' src=\'\/style\/button1_18.gif\' title=\'上一页\' onclick=\"javascript:window.location.href=\'\/topics\/"+topicid+"-"+currentPagePre+".html\'\" \/>\n";
	}		
	str=str+"<span class='fy'>\n";

	var indexStr="";
	for(var i=start; i<=end; i++){
		if(currentPage==i){
			indexStr=indexStr+"<span class='or'> <a href='/topics/"+topicid+"-"+i+".html'>"+i+"</a> </span>\n";
		}else{
			indexStr=indexStr+"<a href='/topics/"+topicid+"-"+i+".html'>"+i+"</a>\n";		
		}
    }

	str=str+indexStr+"</span>";	
	
	if(totalPage==currentPage){
		str=str+"<img style='CURSOR: pointer' src='/style/button1_20.gif' title='下一页' onclick='' />\n";
	}else{	
		str=str+"<img style=\'CURSOR: pointer\' src=\'\/style\/button1_20.gif\' title=\'下一页\' onclick=\"javascript:window.location.href=\'\/topics\/"+topicid+"-"+currentPageNext+".html\'\" \/>\n";
	}	
	if(totalPage-currentPage<=10){
		str=str+"<img style='CURSOR: pointer' src='/style/button1_22.gif' title='后10页' onclick='' />\n";	
	}else{	
		str=str+"<img style=\'CURSOR: pointer\' src=\'\/style\/button1_22.gif\' title=\'后10页\' onclick=\"javascript:window.location.href=\'\/topics\/"+topicid+"-"+currentPageNextTen+".html\'\" \/>\n";
	}	
	var str1=str+"<input  type='text' id='page_value_' />\n"+"<a title='跳转' href='javascript:toPage("+totalPage+","+topicid+");'><img src='/style/button1_14.gif' /></a>";
	var str2=str+"<input  type='text' id='page_value2_'/>\n"+"<a title='跳转' href='javascript:toPage2("+totalPage+","+topicid+");'><img src='/style/button1_14.gif' /></a>";
					
	$("paginate1").innerHTML=str1;
	$("paginate2").innerHTML=str2;	
}

//调用dwr生成该文章的分页HTML
function articlePaginate_staticHtmlHander(map){
	var start=map.start;
	var end=map.end;
	var currentPage=map.currentPage;
	var articleId=map.articleId;
	
	var str="<span class=\"fy\">\n";
	str=str+"文章页数：&nbsp;&nbsp\n";

	for(var i=start; i<=end; i++){
		if(currentPage==i){			
			str=str+"	<span class=\"or\">\n";
			str=str+"<a href='/articles/"+articleId+"-"+i+".html'>第"+i+"页&nbsp;&nbsp;</a>\n";
			str=str+"	<\/span>\n";			
		}else{
			str=str+"<a href='/articles/"+articleId+"-"+i+".html'>第"+i+"页&nbsp;</a>\n";					
		}
    }    
	str=str+"<\/span>	\n";			
	$("paginate1").innerHTML=str;
	$("paginate2").innerHTML=str;	
}
function writeTitleLeaveText(oform){
    var str=oform.value;   
    var i=str.length;   
    var j=6000-i;
    if (j<=0){   
  		window.alert("超出长度");  
  		return  false;   
 	}  	
 	var obj=document.getElementById("leaveWordText");
 	obj.innerHTML=j;
}

function toPage(totalPage,topicid){	
	var page=DWRUtil.getValue("page_value_");	

	if(page>totalPage){
		alert("您输入的页数超过总页数！");
		return ;
	}
	var patrn=/^[0-9]*[1-9][0-9]*$/;   
	if (!patrn.exec(page)){
		alert("只能输入数字");
		return;
	}	
	window.location.href="/topics/"+topicid+"-"+page+".html";
}	
function toPage2(totalPage,topicid){
	var page=DWRUtil.getValue("page_value2_");
	var patrn=/^[0-9]*[1-9][0-9]*$/;   
	if (!patrn.exec(page)){
		alert("只能输入数字");
		return;
	}	
	if(page>totalPage){
		alert("您输入的页数超过总页数！");
		return ;
	}	
	window.location.href="/topics/"+topicid+"-"+page+".html";
}

function showFace(obj) {
	var face = document.getElementById("face");
	face.style.display = 'block';		
	face.style.left = getAbsolutePos(obj).x+50+"px";
	face.style.top = getAbsolutePos(obj).y+1+"px";
}	
function hideSLibao(divId) {
	var objLibao = document.getElementById('slibao');
    objLibao.style.display='none';
}
function doOver(id) {
	var str="background-color:#97c2ed;cursor:hand;";
	document.getElementById(id).style.cssText=str;
}
function doOut(id) {
	var str="cursor:hand;";	
    document.getElementById(id).style.cssText=str;
}	
function doclick(text) {	
	if(text==undefined)return;     
    text = ' ' + text;
    bbfontstyle(text, '');    	
	document.getElementById("face").style.display='none';
}
function getAbsolutePos(el) {
  var r = {x:el.offsetLeft, y:el.offsetTop};
  if (el.offsetParent) {
	  var tmp = getAbsolutePos(el.offsetParent);
	  r.x += tmp.x;
	  r.y += tmp.y;
  }	  
  return r;
}

//点击表情
function bbfontstyle(bbopen,bbclose) {
	var txtarea = document.post.message;//IE	
	if (document.selection){
		txtarea.focus();
    	sel = document.selection.createRange();
    	sel.text = bbopen+sel.text+bbclose;//Mozilla-Netscape
  	}else if (txtarea.selectionStart || txtarea.selectionStart == '0') {
   		var startPos = txtarea.selectionStart;
   		var endPos = txtarea.selectionEnd;
   		var cursorPos = endPos;
   		var scrollTop = txtarea.scrollTop;
   		if (startPos != endPos) {
      		txtarea.value = txtarea.value.substring(0, startPos)
                 + bbopen
                 + txtarea.value.substring(startPos, endPos)
                 + bbclose
                 + txtarea.value.substring(endPos, txtarea.value.length);
      			cursorPos += bbopen.length + bbclose.length;
  		}else{
         	txtarea.value = txtarea.value.substring(0, startPos)
                  + bbopen+' '+bbclose
                  + txtarea.value.substring(endPos, txtarea.value.length);
      		cursorPos = startPos + bbopen.length+bbclose.length+1;
   		}
	  	txtarea.focus();
	   	txtarea.selectionStart = cursorPos;
	   	txtarea.selectionEnd = cursorPos;
	   	txtarea.scrollTop = scrollTop;
	}else {
	   txtarea.value += bbopen+' '+bbclose;
   	   txtarea.focus();
    }
}
//选择文本框中产生的事件。
function storeCaret(textEl) {
	if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}




//printHtml.js

function printHead(){
	var str=
	"   <div id=\"logo\"><a title=\"Till startsidan\"	href=\"http:\/\/www.java91.com\/\"> <img alt=\"java91\"	src=\"\/images2\/LogoImageCAYHJPND.png\"><\/a><\/div>"+
	"	<div id=\"RoundedCornerTop\">	<div id=\"nav-main\">"+
	"		<ul >"+
	"			<li id=li1 onclick='selectTitle(this)'><a class=\"sel\" href=\"\/index.html\">主页<\/a><\/li>"+
	"			<li id=li2 onclick='selectTitle(this)'><a href=\"\/hao.html\">自定义网址导航<\/a><\/li>"+	
	"			<li id=li3 onclick='selectTitle(this)'><a href=\"\/biz\/download.html\">免费下载<\/a><\/li>"+
	"			<li id=li4 onclick='selectTitle(this)'><a href=\"\/biz\/coursepoint.html\">课程介绍<\/a><\/li>"+	
	"			<li id=li5 onclick='selectTitle(this)'><a href=\"\/biz\/project.html\">项目介绍<\/a><\/li>"+
	"			<li id=li6 onclick='selectTitle(this)'><a href=\"\/forum\/forumAction!topicList.action?talkAreaId=101\" target='_blank'>论坛<\/a><\/li>"+
	"			<li id=li7 onclick='selectTitle(this)'><a href=\"\/forum\/forumAction!articleList.action?talkAreaId=202\" target='_blank'>知识库<\/a>	<\/li>"+
	"			<li id=li8 onclick='selectTitle(this)'><a href=\"\/biz\/contractProject.html\" >本站业务<\/a><\/li>"+
	"			<li id=li9 onclick='selectTitle(this)'><a href=\"\/biz\/contact.html\">联系<\/a><\/li>"+	
	"			<li id=li10 onclick='selectTitle(this)'><a href=\"\/jsp\/commons\/adminLogon.jsp\" target='_blank'>admin<\/a><\/li>"+	
	"		<\/ul>"+
	"	<\/div>"+
	"<i class=\"rbottom\"><i class=\"r4\"></i><i class=\"r3\"></i><i class=\"r2\"></i><i class=\"r1\"></i></i></div>";
	var o = document.getElementById('head');
  	if (!o) return false; 	
 	var d = document.createElement('div');
  	o.innerHTML = str;

}

function selectTitle(obj){
	setCookieSimp("selectTitle", obj.id, 25);	
}

function readTitle(){
	var ids=getCookie("selectTitle");	
	if(ids!=null && ids.length>0){	
		id(ids).className="sel";
	}else{
		id("li1").className="sel";
	}
}


function printHeadSkip(){
	var str=
"<STRONG>Hoppa till:<\/STRONG>"+
"<UL>"+
"   <LI><A href=\"http:\/\/www.netrelations.se\/tjanster\/#content-primary-b\">Huvudinnehåll<\/A>"+
"   <LI><A href=\"http:\/\/www.netrelations.se\/tjanster\/#content-secondary\">Sekundärt innehåll<\/A><\/LI>"+
"<\/UL>";	
	var o = document.getElementById('skip');
  	if (!o) return false;  	
 	var d = document.createElement('div');
  	o.innerHTML = str;  	
}


function printLeftTitle(){
	var str=
"<DIV id=nav-sub>"+
"	<DIV class=module-content>"+
"		<UL id=subnav>"+
"			<LI id=leftli1 onclick='selectLeftTitle(this)'><A id=leftli1a href=\'coursepoint.html\'>JAVA91课程特点<\/A>	"+
"			<LI id=leftli2 onclick='selectLeftTitle(this)'><A id=leftli2a href=\'project.html\'>JAVA91项目介绍<\/A>	"+
"			<LI id=leftli3 onclick='selectLeftTitle(this)'><A id=leftli3a href=\'courselist.html\'>课程列表<\/A>"+
"			<LI id=leftli4 onclick='selectLeftTitle(this)'><A id=leftli4a href=\'download.html\'>免费下载<\/A>	"+
"			<LI id=leftli5 onclick='selectLeftTitle(this)'><A id=leftli5a href=\'registrationFlow.html\'>报名流程<\/A>"+
"			<LI id=leftli6 onclick='selectLeftTitle(this)'><A id=leftli6a href=\'learnFlow.html\'>学习流程<\/A>"+
"			<LI id=leftli7 onclick='selectLeftTitle(this)'><A id=leftli7a href=\'developFlow.html\'>项目开发流程<\/A>"+
"			<LI id=leftli8 onclick='selectLeftTitle(this)'><A id=leftli8a href=\'question.html\'>常见问题<\/A>"+
"			<LI id=leftli9 onclick='selectLeftTitle(this)'><A id=leftli9a href=\'contractProject.html\'>本站业务<\/A><\/LI>"+
"			<LI id=leftli10 onclick='selectLeftTitle(this)'><A id=leftli10a href=\'contact.html\'>联系方法<\/A><\/LI>	"+
"			<LI id=leftli11 onclick='selectLeftTitle(this)'><A id=leftli11a href=\'declare.html\'>JAVA91申明<\/A><\/LI>"+
"		<\/UL>"+
"	<\/DIV>"+
"<\/DIV>";	
	
	var o = document.getElementById('content-primary-a');
	if (!o) return false;  	
 	var d = document.createElement('div');
  	o.innerHTML = str;
}

function selectLeftTitle(obj){
	//alert(obj.id);
	setCookieSimp("selectLeftTitle", obj.id, 25);
}

function readLeftTitle(){
	var ids=getCookie("selectLeftTitle");		
	if(ids!=null && ids.length>0){
		id(ids+"a").className="sel";
	}else{
		id("leftli1a").className="sel";
	}
}


function printSearch(){
	var str=
"<DIV id=search>"+
"	<DIV class=search-form>"+
"		<DIV class=\"form-wrapper clearfix\">"+
"			<SPAN class=\"control-group text\">"+
"				<LABEL for=searchtext>站内搜索:<\/LABEL> "+
"				<INPUT id=searchtext title=\"\" name=searchtext>"+
"			<\/SPAN>"+
"			<SPAN class=submit-area>"+
"			<DIV id=buttonMid style=\"margin-top:2px\" onclick=\"search();\"><A style=\"FLOAT: left\" title=搜索 href=\"#\">搜索</A></DIV>";+
"			<\/SPAN>"+
"		<\/DIV>"+
"	<\/DIV>"+
"<\/DIV>";

	var o = document.getElementById('searchwrap');
  	if (!o) return false;  
	
 	var d = document.createElement('div');
  	o.innerHTML = str;
  	//o.appendChild(d);
}

function printFooter(){
	var str=
"<div id=\"RoundedCorner\"><b class=\"rtop\"><b class=\"r1\"></b><b class=\"r2\"></b><b class=\"r3\"></b><b class=\"r4\"></b></b>"+
"<DIV id=contact-info>"+
"<DIV class=vcard>"+
"	<SPAN class=\"org fn\">联系人：黄伟林 136 8233 0453<BR><\/SPAN>"+
"	<SPAN class=\"org fn\">QQ留言:<a  href=\"tencent:\/\/message\/?uin=397498053&Site=JAVA91&Menu=no\"><font color=#fff>397498053</font><\/a>&nbsp;&nbsp;"+
"	MSN留言:<a target=\"blank\" href=\"msnim:chat?contact=leo@sjcgw.com\"><font color=#fff>eqeq3@163.com</font><\/a><BR><\/SPAN>"+
"<\/DIV></div>";
	var o = document.getElementById('footer');
  	if (!o) return false;  
	
 	var d = document.createElement('div');
  	o.innerHTML = str;
  	//o.appendChild(d);
}

function printArticleLeftMenu(){
	var str=
"<!-- ************************************************************************* -->"+
"<H2 class=mr >"+
"	<SPAN ><img id=\"talkAreaType1img\" src=\"\/style\/icon1_07.gif\"\/><A href=\"#\" id=\"talkAreaType1\" onclick=\"clickTitle(this)\" >JAVA基础<\/A><\/SPAN>"+
"<\/H2>"+
"<div id=\"talkAreaType1div\" style=\"display:none;\">"+
"	<H3><SPAN id=201><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=201\">计算机基础<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=202><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=202\">JAVA语言基础<\/A><\/SPAN><\/H3>"+
"	<H3><SPAN id=203><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=203\">面向对象<\/A><\/SPAN><\/H3>"+
"	<H3><SPAN id=204><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=204\">字符编码<\/A><\/SPAN><\/H3>"+
"	<H3><SPAN id=205><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=205\">JAVA容器<\/A><\/SPAN><\/H3>"+
"	<H3><SPAN id=206><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=206\">JAVA异常<\/A><\/SPAN><\/H3>"+
"	<H3><SPAN id=207><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=207\">多线程-并发<\/A><\/SPAN><\/H3>"+
"	<H3><SPAN id=208><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=208\">JDBC<\/A><\/SPAN><\/H3>"+
"<\/div>"+
"<!-- ************************************************************************* -->"+
"<H2 class=mr >"+
"	<SPAN ><img id=\"talkAreaType2img\" src=\"\/style\/icon1_07.gif\"\/><A href=\"#\" id=\"talkAreaType2\" onclick=\"clickTitle(this)\" >J2EE-WEB<\/A><\/SPAN>"+
"<\/H2>	"+
"<div id=\"talkAreaType2div\" style=\"display:none;\">		"+
"	<H3><SPAN id=209><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=209\">网络基础<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=210><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=210\">WEB基础<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=211><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=211\">HTML<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=212><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=212\">CSS<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=213><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=213\">JavaScript<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=214><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=214\">AJAX-DWR<\/A><\/SPAN>	<\/H3>"+
"<\/div>	"+
"<!-- ************************************************************************* -->"+
"<H2 class=mr >"+
"	<SPAN ><img id=\"talkAreaType3img\" src=\"\/style\/icon1_07.gif\"\/><A href=\"#\" id=\"talkAreaType3\" onclick=\"clickTitle(this)\" >分布式系统<\/A><\/SPAN>"+
"<\/H2>		"+
"<div id=\"talkAreaType3div\"  style=\"display:none;\">"+
"	<H3><SPAN id=215><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=215\">分布式系统基础<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=216><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=216\">XML\/XSD\/DTD<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=217><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=217\">jdom\/sax\/jaxb<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=218><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=218\">RMI<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=219><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=219\">WebService-CXF<\/A><\/SPAN>	<\/H3>"+
"<\/div>				"+
"<!-- ************************************************************************* -->"+
"<H2 class=mr >"+
"	<SPAN ><img id=\"talkAreaType4img\" src=\"\/style\/icon1_07.gif\"\/><A href=\"#\" id=\"talkAreaType4\" onclick=\"clickTitle(this)\" >框架专题<\/A><\/SPAN>"+
"<\/H2>"+
"<div id=\"talkAreaType4div\" style=\"display:none;\">				"+
"	<H3><SPAN id=220><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=220\">MVC(Struts)<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=221><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=221\">spring<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=222><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=222\">ORM-iBatis<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=223><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=223\">ORM-Hibernate<\/A><\/SPAN>	<\/H3>"+
"<\/div>"+
"<!-- ************************************************************************* -->"+
"<H2 class=mr >"+
"	<SPAN><img id=\"talkAreaType5img\" src=\"\/style\/icon1_07.gif\"\/><A href=\"#\" id=\"talkAreaType5\" onclick=\"clickTitle(this)\" >开发工具-包<\/A><\/SPAN>"+
"<\/H2>"+
"<div id=\"talkAreaType5div\"  style=\"display:none;\">"+
"	<H3><SPAN id=224><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=224\">eclipse<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=225><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=225\">ant<\/A><\/SPAN>	<\/H3>"+
"<\/div>"+
"<!-- ************************************************************************* -->"+
"<H2 class=mr >"+
"	<SPAN ><img id=\"talkAreaType6img\" src=\"\/style\/icon1_07.gif\"\/><A href=\"#\" id=\"talkAreaType6\" onclick=\"clickTitle(this)\" >数据库<\/A><\/SPAN>"+
"<\/H2>"+
"<div id=\"talkAreaType6div\"  style=\"display:none;\">"+
"	<H3><SPAN id=226><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=226\">数据库基础<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=227><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=227\">SQL语言<\/A><\/SPAN>	<\/H3>"+
"<\/div>"+
"<!-- ************************************************************************* -->"+
"<H2 class=mr >"+
"	<SPAN><img id=\"talkAreaType7img\" src=\"\/style\/icon1_07.gif\"\/><A href=\"#\" id=\"talkAreaType7\" onclick=\"clickTitle(this)\" >软件工程<\/A><\/SPAN>"+
"<\/H2>"+
"<div id=\"talkAreaType7div\"  style=\"display:none;\">	"+
"	<H3><SPAN id=228><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=228\">需求管理<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=229><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=229\">PowerDesigner<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=230><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=230\">Rose<\/A><\/SPAN>	<\/H3>"+
"<\/div>"+
"<!-- ************************************************************************* -->"+
"<H2 class=mr >"+
"	<SPAN ><img id=\"talkAreaType8img\" src=\"\/style\/icon1_07.gif\"\/><A href=\"#\" id=\"talkAreaType8\" onclick=\"clickTitle(this)\" >其它<\/A><\/SPAN>"+
"<\/H2>"+
"<div id=\"talkAreaType8div\"  style=\"display:none;\">"+
"	<H3><SPAN id=231><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=231\">就业相关<\/A><\/SPAN>	<\/H3>"+
"	<H3><SPAN id=232><img src=\"\/style\/icon1_20.gif\" \/><A href=\"\/forum\/forumAction!articleList.action?talkAreaId=232\">行业新闻<\/A><\/SPAN>	<\/H3>"+
"<\/div>";
	var o = document.getElementById('articleLeftMenu');
  	if (!o) return false;	  	
 	var d = document.createElement('div');
  	o.innerHTML = str;
}

function clickTitle(obj){
	setCookieSimp("articleLeftMenu", obj.id, 25);
	readArticleLeftMenu();
} 

function readArticleLeftMenu(){
	var ids=getCookie("articleLeftMenu");	
	if(ids!=null && ids.length>0){		
		var div=ids+"div";
		var img=ids+"img";		
		hide("talkAreaType1div");id("talkAreaType1img").src="/style/icon1_07.gif";
		hide("talkAreaType2div");id("talkAreaType2img").src="/style/icon1_07.gif";
		hide("talkAreaType3div");id("talkAreaType3img").src="/style/icon1_07.gif";
		hide("talkAreaType4div");id("talkAreaType4img").src="/style/icon1_07.gif";
		hide("talkAreaType5div");id("talkAreaType5img").src="/style/icon1_07.gif";
		hide("talkAreaType6div");id("talkAreaType6img").src="/style/icon1_07.gif";
		hide("talkAreaType7div");id("talkAreaType7img").src="/style/icon1_07.gif";	
		hide("talkAreaType8div");id("talkAreaType8img").src="/style/icon1_07.gif";		
		show(div);id(img).src="/style/icon1_03.gif";
	}else{	
		show("talkAreaType1div");id("talkAreaType1img").src="/style/icon1_03.gif";		
	}
}


function printSpeedReply(topicid){
var str=
"<TABLE class=mart10 cellSpacing=0 cellPadding=0 width=800px align=center border=0>"+
"	<TBODY>"+
"		<TR>"+
"			<TD width=70px height=30><STRONG>快速回复<\/STRONG><\/TD>"+
"			<TD width=640px>"+
"				<DIV class=qReply style=\"WIDTH: 300px\">"+
"					<DIV class=qRface id=D_facePar>								"+
"						<SPAN class=href onmousemove=showFace(this);><IMG src=\"\/style\/insertface.gif\"><U id=D_selectface style=\"cursor:hand;\">选择表情<\/U><\/SPAN> "+
"						<DIV class=\"floatBox inspic\" id=D_insertImgDiv style=\"DISPLAY: none\">"+
"							<P>图片链接： <INPUT class=input1 id=D_imgInput value=http:\/\/> <\/P>"+
"							<DIV>"+
"								<BUTTON class=com_btn onclick=Face.DoInsertImg()>确定<\/BUTTON>"+
"								<BUTTON class=com_btn onclick=Face.CloseInsertImg()>取消<\/BUTTON> "+
"							<\/DIV>"+
"						<\/DIV>						"+
"					<\/DIV>"+
"				<\/DIV>"+
"			<\/TD>			"+
"			<TD width=90px>"+
"				<IMG style=\"CURSOR: pointer\"  onclick=\"javascript:window.location=\'\/forum\/forumAction!postAdd.action?topicid="+topicid+"\'\" height=19 src=\"\/style\/bbspic6_27.gif\" width=83 align=right border=0>"+
"			<\/TD>"+
"		<\/TR>"+
"		<TR>"+
"			<TD>&nbsp;<\/TD>"+
"			<TD colSpan=2>						"+
"				<TEXTAREA class=tearea 	style=\"color:#3B5998\" name=message id=message onkeydown=\"writeTitleLeaveText(this);\" "+
"						onselect=storeCaret(this); maxlength=\"6000\" onkeyup=\"writeTitleLeaveText(this);storeCaret(this);\""+
"						onclick=\"document.getElementById(\'face\').style.display=\'none\';storeCaret(this);\"><\/TEXTAREA> "+
"			<\/TD>"+
"		<\/TR>"+
"		<TR>"+
"			<TD height=45><\/TD>"+
"			<TD><SPAN>您还可以输入 <SPAN class=orange1 id=leaveWordText><\/SPAN>个汉字<\/SPAN><\/TD>"+
"			<TD align=right><DIV id=buttonMid style=\"FLOAT: right\"><A style=\"FLOAT: left\" id=submitNewReply onclick=\"submitReply();\" title=发新贴 href=\"javascript:return false;\">提交</A></DIV>";+

"		<\/TR>"+
"	<\/TBODY>"+
"<\/TABLE>";

	var o = document.getElementById('speedReply');
  	if (!o) return false; 
  	o.innerHTML = str;

}

function printEmotion(){
var str=
"<div id=\"face\" style=\"display:none;WIDTH: 400px;HEIGHT: 50px; POSITION:absolute;"+
"BORDER-RIGHT: #a3caf3 1px solid; BORDER-TOP: #a3caf3 1px solid; PADDING-LEFT: 10px;"+
"SCROLLBAR-FACE-COLOR: #cfe9f6; BORDER-LEFT: #a3caf3 1px solid; SCROLLBAR-SHADOW-COLOR: #a3caf3; "+
"COLOR: #a7a7a7; SCROLLBAR-3DLIGHT-COLOR: #fff; SCROLLBAR-ARROW-COLOR: #a1cbf3; PADDING-TOP: 10px; "+
"SCROLLBAR-TRACK-COLOR: #eff4fa; BORDER-BOTTOM: #a3caf3 1px solid; SCROLLBAR-DARKSHADOW-COLOR: #a3caf3; SCROLLBAR-BASE-COLOR: #eff4fa; "+
"scrollBar-hightLight-color: #EFF4FA\">				"+
"	<img id=face1 src=\"\/style\/emotion\/01.gif\" onmouseover=\"doOver(\'face1\')\" onmouseout=\"doOut(\'face1\')\" onclick=\"doclick(\':)_01\')\" style=\"cursor:hand;\"\/>"+
"	<img id=face2 src=\"\/style\/emotion\/02.gif\" onmouseover=\"doOver(\'face2\')\" onmouseout=\"doOut(\'face2\')\" onclick=\"doclick(\':)_02\')\" style=\"cursor:hand;\"\/>	"+
"	<img id=face3 src=\"\/style\/emotion\/03.gif\" onmouseover=\"doOver(\'face3\')\" onmouseout=\"doOut(\'face3\')\" onclick=\"doclick(\':)_03\')\" style=\"cursor:hand;\"\/>"+
"	<img id=face4 src=\"\/style\/emotion\/04.gif\" onmouseover=\"doOver(\'face4\')\" onmouseout=\"doOut(\'face4\')\" onclick=\"doclick(\':)_04\')\" style=\"cursor:hand;\"\/>"+
"	<img id=face5 src=\"\/style\/emotion\/05.gif\" onmouseover=\"doOver(\'face5\')\" onmouseout=\"doOut(\'face5\')\" onclick=\"doclick(\':)_05\')\" style=\"cursor:hand;\"\/>"+
"	<img id=face6 src=\"\/style\/emotion\/06.gif\" onmouseover=\"doOver(\'face6\')\" onmouseout=\"doOut(\'face6\')\" onclick=\"doclick(\':)_06\')\" style=\"cursor:hand;\"\/>"+
"	<img id=face7 src=\"\/style\/emotion\/07.gif\" onmouseover=\"doOver(\'face7\')\" onmouseout=\"doOut(\'face7\')\" onclick=\"doclick(\':)_07\')\" style=\"cursor:hand;\"\/>"+
"	<img id=face8 src=\"\/style\/emotion\/08.gif\" onmouseover=\"doOver(\'face8\')\" onmouseout=\"doOut(\'face8\')\" onclick=\"doclick(\':)_08\')\" style=\"cursor:hand;\"\/>"+
"	<img id=face9 src=\"\/style\/emotion\/09.gif\" onmouseover=\"doOver(\'face9\')\" onmouseout=\"doOut(\'face9\')\" onclick=\"doclick(\':)_09\')\" style=\"cursor:hand;\"\/>"+
"	<img id=face10 src=\"\/style\/emotion\/10.gif\" onmouseover=\"doOver(\'face10\')\" onmouseout=\"doOut(\'face10\')\" onclick=\"doclick(\':)_10\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face11 src=\"\/style\/emotion\/11.gif\" onmouseover=\"doOver(\'face11\')\" onmouseout=\"doOut(\'face11\')\" onclick=\"doclick(\':)_11\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face12 src=\"\/style\/emotion\/12.gif\" onmouseover=\"doOver(\'face12\')\" onmouseout=\"doOut(\'face12\')\" onclick=\"doclick(\':)_12\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face13 src=\"\/style\/emotion\/13.gif\" onmouseover=\"doOver(\'face13\')\" onmouseout=\"doOut(\'face13\')\" onclick=\"doclick(\':)_13\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face14 src=\"\/style\/emotion\/14.gif\" onmouseover=\"doOver(\'face14\')\" onmouseout=\"doOut(\'face14\')\" onclick=\"doclick(\':)_14\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face15 src=\"\/style\/emotion\/15.gif\" onmouseover=\"doOver(\'face15\')\" onmouseout=\"doOut(\'face15\')\" onclick=\"doclick(\':)_15\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face16 src=\"\/style\/emotion\/16.gif\" onmouseover=\"doOver(\'face16\')\" onmouseout=\"doOut(\'face16\')\" onclick=\"doclick(\':)_16\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face17 src=\"\/style\/emotion\/17.gif\" onmouseover=\"doOver(\'face17\')\" onmouseout=\"doOut(\'face17\')\" onclick=\"doclick(\':)_17\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face18 src=\"\/style\/emotion\/18.gif\" onmouseover=\"doOver(\'face18\')\" onmouseout=\"doOut(\'face18\')\" onclick=\"doclick(\':)_18\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face29 src=\"\/style\/emotion\/19.gif\" onmouseover=\"doOver(\'face19\')\" onmouseout=\"doOut(\'face19\')\" onclick=\"doclick(\':)_19\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face20 src=\"\/style\/emotion\/20.gif\" onmouseover=\"doOver(\'face20\')\" onmouseout=\"doOut(\'face20\')\" onclick=\"doclick(\':)_20\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face21 src=\"\/style\/emotion\/21.gif\" onmouseover=\"doOver(\'face21\')\" onmouseout=\"doOut(\'face21\')\" onclick=\"doclick(\':)_21\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face22 src=\"\/style\/emotion\/22.gif\" onmouseover=\"doOver(\'face22\')\" onmouseout=\"doOut(\'face22\')\" onclick=\"doclick(\':)_22\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face23 src=\"\/style\/emotion\/23.gif\" onmouseover=\"doOver(\'face23\')\" onmouseout=\"doOut(\'face23\')\" onclick=\"doclick(\':)_23\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face24 src=\"\/style\/emotion\/24.gif\" onmouseover=\"doOver(\'face24\')\" onmouseout=\"doOut(\'face24\')\" onclick=\"doclick(\':)_24\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face25 src=\"\/style\/emotion\/25.gif\" onmouseover=\"doOver(\'face25\')\" onmouseout=\"doOut(\'face25\')\" onclick=\"doclick(\':)_25\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face26 src=\"\/style\/emotion\/26.gif\" onmouseover=\"doOver(\'face26\')\" onmouseout=\"doOut(\'face26\')\" onclick=\"doclick(\':)_26\')\" style=\"cursor:hand;\"\"\/>"+
"	<img id=face27 src=\"\/style\/emotion\/27.gif\" onmouseover=\"doOver(\'face27\')\" onmouseout=\"doOut(\'face27\')\" onclick=\"doclick(\':)_27\')\" style=\"cursor:hand;\"\"\/>"+
"<\/div>";
	var o = document.getElementById('emotionScript');
  	if (!o) return false; 
  	o.innerHTML = str;
}




//------------------START-----------------SyntaxHighlighter------------------------------
var dp = {
    sh: {
        Toolbar: {},
        Utils: {},
        RegexLib: {},
        Brushes: {},
        Strings: {},
        Version: '1.4.1'
    }
};
dp.SyntaxHighlighter = dp.sh;
dp.sh.Toolbar.Commands = {
    ExpandSource: {
        label: '+ \u5c55\u5f00',
        check: function(highlighter) {
            return highlighter.collapse;
        },
        func: function(sender, highlighter) {
            sender.parentNode.removeChild(sender);
            highlighter.div.className = highlighter.div.className.replace('collapsed', '');
        }
    },
    ViewSource: {
        label: '\u6e90\u7801',
        func: function(sender, highlighter) {
            var code = highlighter.originalCode.replace(/</g, '&lt;');
            var wnd = window.open('', '_blank', 'width=750,height=400,location=0,resizable=1,menubar=0,scrollbars=1');
            wnd.document.write('<textarea style="width:99%;height:99%">' + code + '</textarea>');
            wnd.document.close();
        }
    },
    CopyToClipboard: {
        label: '\u590d\u5236',
        check: function() {
            return window.clipboardData != null;
        },
        func: function(sender, highlighter) {
            window.clipboardData.setData('text', highlighter.originalCode);
            alert('\u4ee3\u7801\u5df2\u590d\u5236');
        }
    },
    PrintSource: {
        label: '\u6253\u5370',
        func: function(sender, highlighter) {
            var iframe = document.createElement('IFRAME');
            var doc = null;
            iframe.style.cssText = 'position:absolute;width:0px;height:0px;left:-500px;top:-500px;';
            document.body.appendChild(iframe);
            doc = iframe.contentWindow.document;
            dp.sh.Utils.CopyStyles(doc, window.document);
            doc.write('<div class="' + highlighter.div.className.replace('collapsed', '') + ' printing">' + highlighter.div.innerHTML + '</div>');
            doc.close();
            iframe.contentWindow.focus();
            iframe.contentWindow.print();
            alert('\u70b9\u786e\u5b9a\u5f00\u59cb\u6253\u5370...');
            document.body.removeChild(iframe);           
        }
    }
};
dp.sh.Toolbar.Create = function(highlighter) {
    var div = document.createElement('DIV');
    div.className = 'tools';
    for (var name in dp.sh.Toolbar.Commands) {
        var cmd = dp.sh.Toolbar.Commands[name];
        if (cmd.check != null && !cmd.check(highlighter)) continue;
        div.innerHTML += '<a href="#" onclick="dp.sh.Toolbar.Command(\'' + name + '\',this);return false;">' + cmd.label + '</a>';
    }
    return div;
}
dp.sh.Toolbar.Command = function(name, sender) {
    var n = sender;
    while (n != null && n.className.indexOf('dp-highlighter') == -1) n = n.parentNode;
    if (n != null) dp.sh.Toolbar.Commands[name].func(sender, n.highlighter);
}
dp.sh.Utils.CopyStyles = function(destDoc, sourceDoc) {
    var links = sourceDoc.getElementsByTagName('link');
    for (var i = 0; i < links.length; i++) if (links[i].rel.toLowerCase() == 'stylesheet') destDoc.write('<link type="text/css" rel="stylesheet" href="' + links[i].href + '"></link>');
}
dp.sh.RegexLib = {
    MultiLineCComments: new RegExp('/\\*[\\s\\S]*?\\*/', 'gm'),
    SingleLineCComments: new RegExp('//.*$', 'gm'),
    SingleLinePerlComments: new RegExp('#.*$', 'gm'),
    DoubleQuotedString: new RegExp('"(?:\\.|(\\\\\\")|[^\\""])*"', 'g'),
    SingleQuotedString: new RegExp("'(?:\\.|(\\\\\\')|[^\\''])*'", 'g')
};
dp.sh.Match = function(value, index, css) {
    this.value = value;
    this.index = index;
    this.length = value.length;
    this.css = css;
}
dp.sh.Highlighter = function() {
    this.noGutter = false;
    this.addControls = true;
    this.collapse = false;
    this.tabsToSpaces = true;
    this.wrapColumn = 80;
    this.showColumns = true;
}
dp.sh.Highlighter.SortCallback = function(m1, m2) {
    if (m1.index < m2.index) return - 1;
    else if (m1.index > m2.index) return 1;
    else {
        if (m1.length < m2.length) return - 1;
        else if (m1.length > m2.length) return 1;
    }
    return 0;
}
dp.sh.Highlighter.prototype.CreateElement = function(name) {
    var result = document.createElement(name);
    result.highlighter = this;
    return result;
}
dp.sh.Highlighter.prototype.GetMatches = function(regex, css) {
    var index = 0;
    var match = null;
    while ((match = regex.exec(this.code)) != null) this.matches[this.matches.length] = new dp.sh.Match(match[0], match.index, css);
}
dp.sh.Highlighter.prototype.AddBit = function(str, css) {
    if (str == null || str.length == 0) return;
    var span = this.CreateElement('SPAN');
    str = str.replace(/&/g, '&amp;');
    str = str.replace(/ /g, '&nbsp;');
    str = str.replace(/</g, '&lt;');
    str = str.replace(/\n/gm, '&nbsp;<br>');
    if (css != null) {
        var regex = new RegExp('<br>', 'gi');
        if (regex.test(str)) {
            var lines = str.split('&nbsp;<br>');
            str = '';
            for (var i = 0; i < lines.length; i++) {
                span = this.CreateElement('SPAN');
                span.className = css;
                span.innerHTML = lines[i];
                this.div.appendChild(span);
                if (i + 1 < lines.length) this.div.appendChild(this.CreateElement('BR'));
            }
        } else {
            span.className = css;
            span.innerHTML = str;
            this.div.appendChild(span);
        }
    } else {
        span.innerHTML = str;
        this.div.appendChild(span);
    }
   // alert(span.innerHTML);
    
}
dp.sh.Highlighter.prototype.IsInside = function(match) {
    if (match == null || match.length == 0) return false;
    for (var i = 0; i < this.matches.length; i++) {
        var c = this.matches[i];
        if (c == null) continue;
        if ((match.index > c.index) && (match.index < c.index + c.length)) return true;
    }
    return false;
}
dp.sh.Highlighter.prototype.ProcessRegexList = function() {
    for (var i = 0; i < this.regexList.length; i++) this.GetMatches(this.regexList[i].regex, this.regexList[i].css);
}
dp.sh.Highlighter.prototype.ProcessSmartTabs = function(code) {
    var lines = code.split('\n');
    var result = '';
    var tabSize = 4;
    var tab = '\t';
    function InsertSpaces(line, pos, count) {
        var left = line.substr(0, pos);
        var right = line.substr(pos + 1, line.length); // pos + 1 will get rid of the tab
        var spaces = '';
        for (var i = 0; i < count; i++) spaces += ' ';
        return left + spaces + right;
    }
    function ProcessLine(line, tabSize) {
        if (line.indexOf(tab) == -1) return line;
        var pos = 0;
        while ((pos = line.indexOf(tab)) != -1) {
            var spaces = tabSize - pos % tabSize;
            line = InsertSpaces(line, pos, spaces);
        }
        return line;
    }
    for (var i = 0; i < lines.length; i++) result += ProcessLine(lines[i], tabSize) + '\n';
    return result;
}
dp.sh.Highlighter.prototype.SwitchToList = function() {
    var html = this.div.innerHTML.replace(/<(br)\/?>/gi, '\n');
    var lines = html.split('\n');
    if (this.addControls == true) this.bar.appendChild(dp.sh.Toolbar.Create(this));
    if (this.showColumns) {
        var div = this.CreateElement('div');
        var columns = this.CreateElement('div');
        var showEvery = 10;
        var i = 1;
        while (i <= 150) {
            if (i % showEvery == 0) {
                div.innerHTML += i;
                i += (i + '').length;
            } else {
                div.innerHTML += '&middot;';
                i++;
            }
        }
        columns.className = 'columns';
        columns.appendChild(div);
        this.bar.appendChild(columns);
    }
    for (var i = 0,
    lineIndex = this.firstLine; i < lines.length - 1; i++, lineIndex++) {
        var li = this.CreateElement('LI');
        //HWLHWLHWL
        li.style.listStyleType="decimal";
        
        var span = this.CreateElement('SPAN');
        li.className = (i % 2 == 0) ? 'alt': '';
        span.innerHTML = lines[i] + '&nbsp;';
        li.appendChild(span);
        this.ol.appendChild(li);
    }
    //alert(this.div.innerHTML);
    this.div.innerHTML = '';
}
dp.sh.Highlighter.prototype.Highlight = function(code) {
    function Trim(str) {
        return str.replace(/^\s*(.*?)[\s\n]*$/g, '$1');
    }
    function Chop(str) {
        return str.replace(/\n*$/, '').replace(/^\n*/, '');
    }
    function Unindent(str) {
        var lines = str.split('\n');
        var indents = new Array();
        var regex = new RegExp('^\\s*', 'g');
        var min = 1000;
        for (var i = 0; i < lines.length && min > 0; i++) {
            if (Trim(lines[i]).length == 0) continue;
            var matches = regex.exec(lines[i]);
            if (matches != null && matches.length > 0) min = Math.min(matches[0].length, min);
        }
        if (min > 0) for (var i = 0; i < lines.length; i++) lines[i] = lines[i].substr(min);
        return lines.join('\n');
    }
    function Copy(string, pos1, pos2) {
        return string.substr(pos1, pos2 - pos1);
    }
    var pos = 0;
    code = code.replace(/(<br\/> )/g, "");
    
   // alert(code);
    this.originalCode = code;
    this.code = Chop(Unindent(code));
    this.div = this.CreateElement('DIV');
    this.bar = this.CreateElement('DIV');
    this.ol = this.CreateElement('OL');
    this.matches = new Array();
    this.div.className = 'dp-highlighter';
    this.div.highlighter = this;
    this.bar.className = 'bar';
    this.ol.start = this.firstLine;
    if (this.CssClass != null) this.ol.className = this.CssClass;
    if (this.collapse) this.div.className += ' collapsed';
    if (this.noGutter) this.div.className += ' nogutter';
    if (this.tabsToSpaces == true) this.code = this.ProcessSmartTabs(this.code);
    this.ProcessRegexList();
    if (this.matches.length == 0) {
        this.AddBit(this.code, null);
        this.SwitchToList();
        this.div.appendChild(this.ol);
        return;
    }
    this.matches = this.matches.sort(dp.sh.Highlighter.SortCallback);
    for (var i = 0; i < this.matches.length; i++) if (this.IsInside(this.matches[i])) this.matches[i] = null;
    for (var i = 0; i < this.matches.length; i++) {
        var match = this.matches[i];
        if (match == null || match.length == 0) continue;
        this.AddBit(Copy(this.code, pos, match.index), null);
        this.AddBit(match.value, match.css);
        pos = match.index + match.length;
    }
    this.AddBit(this.code.substr(pos), null);
    this.SwitchToList();
    this.div.appendChild(this.bar);
    this.div.appendChild(this.ol);
    
   
   // alert(this.div.innerHTML);
   // writeDebug(this.div.innerHTML);
}
dp.sh.Highlighter.prototype.GetKeywords = function(str) {
    return '\\b' + str.replace(/ /g, '\\b|\\b') + '\\b';
}
dp.sh.HighlightAll = function(name, showGutter, showControls, collapseAll, firstLine, showColumns) {
    function FindValue() {
        var a = arguments;
        for (var i = 0; i < a.length; i++) {
            if (a[i] == null) continue;
            if (typeof(a[i]) == 'string' && a[i] != '') return a[i] + '';
            if (typeof(a[i]) == 'object' && a[i].value != '') return a[i].value + '';
        }
        return null;
    }
    function IsOptionSet(value, list) {
        for (var i = 0; i < list.length; i++) if (list[i] == value) return true;
        return false;
    }
    function GetOptionValue(name, list, defaultValue) {
        var regex = new RegExp('^' + name + '\\[(\\w+)\\]$', 'gi');
        var matches = null;
        for (var i = 0; i < list.length; i++) if ((matches = regex.exec(list[i])) != null) return matches[1];
        return defaultValue;
    }
    var elements = document.getElementsByName(name);
    var highlighter = null;
    var registered = new Object();
    var propertyName = 'value';
    if (elements == null) return;
    for (var brush in dp.sh.Brushes) {
        var aliases = dp.sh.Brushes[brush].Aliases;
        if (aliases == null) continue;
        for (var i = 0; i < aliases.length; i++) registered[aliases[i]] = brush;
    }
    for (var i = 0; i < elements.length; i++) {
        var element = elements[i];
        var options = FindValue(element.attributes['class'], element.className, element.attributes['language'], element.language);
        var language = '';
        if (options == null) continue;
        options = options.split(':');
        language = options[0].toLowerCase();
        if (registered[language] == null) continue;
        highlighter = new dp.sh.Brushes[registered[language]]();
        element.style.display = 'none';
        highlighter.noGutter = (showGutter == null) ? IsOptionSet('nogutter', options) : !showGutter;
        highlighter.addControls = (showControls == null) ? !IsOptionSet('nocontrols', options) : showControls;
        highlighter.collapse = (collapseAll == null) ? IsOptionSet('collapse', options) : collapseAll;
        highlighter.showColumns = (showColumns == null) ? IsOptionSet('showcolumns', options) : showColumns;
        highlighter.firstLine = (firstLine == null) ? parseInt(GetOptionValue('firstline', options, 1)) : firstLine;
        highlighter.Highlight(element[propertyName]);
        element.parentNode.insertBefore(highlighter.div, element);
    }
}




/*
 * JsMin
 * Javascript Compressor
 * http://www.crockford.com/
 * http://www.smallsharptools.com/
*/

dp.sh.Brushes.CSS=function()
{var keywords='ascent azimuth background-attachment background-color background-image background-position '+'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top '+'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color '+'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width '+'border-bottom-width border-left-width border-width border cap-height caption-side centerline clear clip color '+'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display '+'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font '+'height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top '+'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans '+'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page '+'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position '+'quotes richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress '+'table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em '+'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';var values='above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';var fonts='[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif';this.regexList=[{regex:dp.sh.RegexLib.MultiLineCComments,css:'comment'},{regex:dp.sh.RegexLib.DoubleQuotedString,css:'string'},{regex:dp.sh.RegexLib.SingleQuotedString,css:'string'},{regex:new RegExp('\\#[a-zA-Z0-9]{3,6}','g'),css:'value'},{regex:new RegExp('(-?\\d+)(\.\\d+)?(px|em|pt|\:|\%|)','g'),css:'value'},{regex:new RegExp('!important','g'),css:'important'},{regex:new RegExp(this.GetKeywordsCSS(keywords),'gm'),css:'keyword'},{regex:new RegExp(this.GetValuesCSS(values),'g'),css:'value'},{regex:new RegExp(this.GetValuesCSS(fonts),'g'),css:'value'}];this.CssClass='dp-css';this.Style='.dp-css .value { color: black; }'+'.dp-css .important { color: red; }';}
dp.sh.Highlighter.prototype.GetKeywordsCSS=function(str)
{return'\\b([a-z_]|)'+str.replace(/ /g,'(?=:)\\b|\\b([a-z_\\*]|\\*|)')+'(?=:)\\b';}
dp.sh.Highlighter.prototype.GetValuesCSS=function(str)
{return'\\b'+str.replace(/ /g,'(?!-)(?!:)\\b|\\b()')+'\:\\b';}
dp.sh.Brushes.CSS.prototype=new dp.sh.Highlighter();dp.sh.Brushes.CSS.Aliases=['css'];



dp.sh.Brushes.Java = function()
{
	var keywords =	'abstract assert boolean break byte case catch char class const ' +
			'continue default do double else enum extends ' +
			'false final finally float for goto if implements import ' +
			'instanceof int interface long native new null ' +
			'package private protected public return ' +
			'short static strictfp super switch synchronized this throw throws true ' +
			'transient try void volatile while';

	this.regexList = [
		{ regex: dp.sh.RegexLib.SingleLineCComments,							css: 'comment' },		// one line comments
		{ regex: dp.sh.RegexLib.MultiLineCComments,								css: 'comment' },		// multiline comments
		{ regex: dp.sh.RegexLib.DoubleQuotedString,								css: 'string' },		// strings
		{ regex: dp.sh.RegexLib.SingleQuotedString,								css: 'string' },		// strings
		{ regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'),	css: 'number' },		// numbers
		{ regex: new RegExp('(?!\\@interface\\b)\\@[\\$\\w]+\\b', 'g'),			css: 'annotation' },	// annotation @anno
		{ regex: new RegExp('\\@interface\\b', 'g'),							css: 'keyword' },		// @interface keyword
		{ regex: new RegExp(this.GetKeywords(keywords), 'gm'),					css: 'keyword' }		// java keyword
		];

	this.CssClass = 'dp-j';
}

dp.sh.Brushes.Java.prototype	= new dp.sh.Highlighter();
dp.sh.Brushes.Java.Aliases	= ['java'];



dp.sh.Brushes.JScript = function()
{
	var keywords =	'abstract boolean break byte case catch char class const continue debugger ' +
					'default delete do double else enum export extends false final finally float ' +
					'for function goto if implements import in instanceof int interface long native ' +
					'new null package private protected public return short static super switch ' +
					'synchronized this throw throws transient true try typeof var void volatile while with';

	this.regexList = [
		{ regex: dp.sh.RegexLib.SingleLineCComments,				css: 'comment' },			// one line comments
		{ regex: dp.sh.RegexLib.MultiLineCComments,					css: 'comment' },			// multiline comments
		{ regex: dp.sh.RegexLib.DoubleQuotedString,					css: 'string' },			// double quoted strings
		{ regex: dp.sh.RegexLib.SingleQuotedString,					css: 'string' },			// single quoted strings
		{ regex: new RegExp('^\\s*#.*', 'gm'),						css: 'preprocessor' },		// preprocessor tags like #region and #endregion
		{ regex: new RegExp(this.GetKeywords(keywords), 'gm'),		css: 'keyword' }			// keywords
		];

	this.CssClass = 'dp-c';
}

dp.sh.Brushes.JScript.prototype	= new dp.sh.Highlighter();
dp.sh.Brushes.JScript.Aliases	= ['js', 'jscript', 'javascript'];




dp.sh.Brushes.Sql = function()
{
	var funcs	=	'abs avg case cast coalesce convert count current_timestamp ' +
					'current_user day isnull left lower month nullif replace right ' +
					'session_user space substring sum system_user upper user year';

	var keywords =	'absolute action add after alter as asc at authorization begin bigint ' +
					'binary bit by cascade char character check checkpoint close collate ' +
					'column commit committed connect connection constraint contains continue ' +
					'create cube current current_date current_time cursor database date ' +
					'deallocate dec decimal declare default delete desc distinct double drop ' +
					'dynamic else end end-exec escape except exec execute false fetch first ' +
					'float for force foreign forward free from full function global goto grant ' +
					'group grouping having hour ignore index inner insensitive insert instead ' +
					'int integer intersect into is isolation key last level load local max min ' +
					'minute modify move name national nchar next no numeric of off on only ' +
					'open option order out output partial password precision prepare primary ' +
					'prior privileges procedure public read real references relative repeatable ' +
					'restrict return returns revoke rollback rollup rows rule schema scroll ' +
					'second section select sequence serializable set size smallint static ' +
					'statistics table temp temporary then time timestamp to top transaction ' +
					'translation trigger true truncate uncommitted union unique update values ' +
					'varchar varying view when where with work';

	var operators =	'all and any between cross in join like not null or outer some';

	this.regexList = [
		{ regex: new RegExp('--(.*)$', 'gm'),						css: 'comment' },			// one line and multiline comments
		{ regex: dp.sh.RegexLib.DoubleQuotedString,					css: 'string' },			// double quoted strings
		{ regex: dp.sh.RegexLib.SingleQuotedString,					css: 'string' },			// single quoted strings
		{ regex: new RegExp(this.GetKeywords(funcs), 'gmi'),		css: 'func' },				// functions
		{ regex: new RegExp(this.GetKeywords(operators), 'gmi'),	css: 'op' },				// operators and such
		{ regex: new RegExp(this.GetKeywords(keywords), 'gmi'),		css: 'keyword' }			// keyword
		];

	this.CssClass = 'dp-sql';
}

dp.sh.Brushes.Sql.prototype	= new dp.sh.Highlighter();
dp.sh.Brushes.Sql.Aliases	= ['sql'];



dp.sh.Brushes.Xml = function()
{
	this.CssClass = 'dp-xml';
}

dp.sh.Brushes.Xml.prototype	= new dp.sh.Highlighter();
dp.sh.Brushes.Xml.Aliases	= ['xml', 'xhtml', 'xslt', 'html', 'xhtml','jsp','php','asp'];

dp.sh.Brushes.Xml.prototype.ProcessRegexList = function()
{
	function push(array, value)
	{
		array[array.length] = value;
	}
	
	/* If only there was a way to get index of a group within a match, the whole XML
	   could be matched with the expression looking something like that:
	
	   (<!\[CDATA\[\s*.*\s*\]\]>)
	   | (<!--\s*.*\s*?-->)
	   | (<)*(\w+)*\s*(\w+)\s*=\s*(".*?"|'.*?'|\w+)(/*>)*
	   | (</?)(.*?)(/?>)
	*/
	var index	= 0;
	var match	= null;
	var regex	= null;

	// Match CDATA in the following format <![ ... [ ... ]]>
	// <\!\[[\w\s]*?\[(.|\s)*?\]\]>
	this.GetMatches(new RegExp('<\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\]>', 'gm'), 'cdata');
	
	// Match comments
	// <!--\s*.*\s*?-->
	this.GetMatches(new RegExp('<!--\\s*.*\\s*?-->', 'gm'), 'comments');

	// Match attributes and their values
	// (:|\w+)\s*=\s*(".*?"|\'.*?\'|\w+)*
	regex = new RegExp('([:\\w-\.]+)\\s*=\\s*(".*?"|\'.*?\'|\\w+)*', 'gm'); // Thanks to Tomi Blinnikka of Yahoo! for fixing namespaces in attributes
	while((match = regex.exec(this.code)) != null)
	{
		push(this.matches, new dp.sh.Match(match[1], match.index, 'attribute'));
	
		// if xml is invalid and attribute has no property value, ignore it	
		if(match[2] != undefined)
		{
			push(this.matches, new dp.sh.Match(match[2], match.index + match[0].indexOf(match[2]), 'attribute-value'));
		}
	}

	// Match opening and closing tag brackets
	// </*\?*(?!\!)|/*\?*>
	this.GetMatches(new RegExp('</*\\?*(?!\\!)|/*\\?*>', 'gm'), 'tag');

	// Match tag names
	// </*\?*\s*(\w+)
	regex = new RegExp('</*\\?*\\s*([:\\w-\.]+)', 'gm');
	while((match = regex.exec(this.code)) != null)
	{
		push(this.matches, new dp.sh.Match(match[1], match.index + match[0].indexOf(match[1]), 'tag-name'));
	}
}
//------------------END-----------------SyntaxHighlighter------------------------------



//------------------START-----------------GSFN------------------------------
GSFN = {
  feedback: function(url, stylestring,tab_options) {
    this.feedback_url = url;
    this.tab_options = tab_options ? tab_options : {};
    this.tab_options.placement = this.tab_options.placement ? this.tab_options.placement : 'left';
    this.tab_options.color = this.tab_options.color ? this.tab_options.color : '#222';
    
   
    this.tab_html = '<a href="#" id="fdbk_tab" class="fdbk_tab_'+this.tab_options.placement+'" style="background-color:'+this.tab_options.color+';'+stylestring+'">FEEDBACK</a>';
    this.overlay_html = '<div id="fdbk_overlay" style="display:none">' +
                          '<div id="fdbk_container">' +
                            '<a href="#" onclick="GSFN.hide();return false" id="fdbk_close"></a>' +
                            '<iframe src="" id="fdbk_iframe" allowTransparency="true" scrolling="no" frameborder="0"></iframe>' +
                          '</div>' +
                          '<div id="fdbk_screen"></div>' +
                        '</div>';
                        
    if(this.tab_options.container) {    	
      var container_el = this.gId(this.tab_options.container);
      container_el.innerHTML = this.tab_html + this.overlay_html;
    } else {
      document.write(this.tab_html);
      document.write(this.overlay_html);      
    }                   

    this.gId('fdbk_tab').onclick = function() { GSFN.show(); return false; }
    //this.gId('fdbk_iframe').setAttribute("src", "");
  },
  set_position: function() {
    this.scroll_top = document.documentElement.scrollTop || document.body.scrollTop;
    
    this.scroll_height2 = document.documentElement.scrollHeight;
    this.scroll_height = document.body.scrollHeight;
    
    if(this.scroll_height<this.scroll_height2){
    	this.scroll_height=this.scroll_height2;    
    }
    
    this.client_height = window.innerHeight || document.documentElement.clientHeight;
   
   // this.gId('fdbk_screen').style.height = this.scroll_height+"px";
     this.gId('fdbk_container').style.top = this.scroll_top+(this.scroll_height2*0.15)+"px";
    
      this.gId('fdbk_screen').style.height = this.scroll_height*1.3+"px";    
    
   // var a1=this.gId('fdbk_container');

  // alert(window.screenLeft);
   // alert(document.body.clientWidth);
    
  //  a1.style.left=(parseInt(document.body.clientWidth)-parseInt(680))/2-window.screenLeft+"px";   
  //  a1.style.top=(parseInt(window.screen.height)-parseInt(340))/2-window.screenTop+"px"
    
   // alert(a1.style.left);; 
    
    
  },
  show: function() {
    if(this.gId('fdbk_iframe').getAttribute("src") == "") {

      this.gId('fdbk_iframe').setAttribute("src", this.feedback_url);
      if (this.gId('fdbk_iframe').addEventListener) {
        this.gId('fdbk_iframe').addEventListener("load", GSFN.loaded, false);
      } else if (this.gId('fdbk_iframe').attachEvent) {
        this.gId('fdbk_iframe').detachEvent("onload", GSFN.loaded);
        this.gId('fdbk_iframe').attachEvent("onload", GSFN.loaded);
      }
    }

    this.set_position();
    this.gId('fdbk_overlay').style.display = "block";
  },
  hide: function() {
   	this.gId('fdbk_iframe').setAttribute("src", this.feedback_url);
      if (this.gId('fdbk_iframe').addEventListener) {
        this.gId('fdbk_iframe').addEventListener("load", GSFN.loaded, false);
      } else if (this.gId('fdbk_iframe').attachEvent) {
        this.gId('fdbk_iframe').detachEvent("onload", GSFN.loaded);
        this.gId('fdbk_iframe').attachEvent("onload", GSFN.loaded);
      }
  
  
    this.gId('fdbk_overlay').style.display = "none";
  },
  loaded: function() {
    GSFN.gId('fdbk_iframe').className = "loaded";
  },
  gId: function(id) {
    return document.getElementById(id);
  }
}



GSFN2 = {
  feedback: function(url, tab_options) {
    this.feedback_url = url;
    this.tab_options = tab_options ? tab_options : {};
    this.tab_options.placement = this.tab_options.placement ? this.tab_options.placement : 'left';
    this.tab_options.color = this.tab_options.color ? this.tab_options.color : '#222';
    
    
    this.tab_html = '<a href="#" id="fdbk_tab" class="fdbk_tab_'+this.tab_options.placement+'" style="display:none;background-color:'+this.tab_options.color+'">FEEDBACK</a>';
    this.overlay_html = '<div id="fdbk_overlay" style="display:none">' +
                          '<div id="fdbk_container">' +
                            '<a href="#" onclick="GSFN2.hide();return false" id="fdbk_close"></a>' +
                            '<iframe src="" id="fdbk_iframe" allowTransparency="true" scrolling="no" frameborder="0"></iframe>' +
                          '</div>' +
                          '<div id="fdbk_screen"></div>' +
                        '</div>';
                        
    if(this.tab_options.container) {    	
      var container_el = this.gId(this.tab_options.container);
      container_el.innerHTML = this.tab_html + this.overlay_html;
    } else {
      document.write(this.tab_html);
      document.write(this.overlay_html);      
    }                   

    //this.gId('fdbk_tab').onclick = function() { GSFN2.show(); return false; }
   // this.gId('fdbk_iframe').setAttribute("src", "");
  },
  
  set_position: function() {
    
    this.scroll_top = document.documentElement.scrollTop || document.body.scrollTop;
    this.scroll_height2 = document.documentElement.scrollHeight;
    this.scroll_height = document.body.scrollHeight;
    
    if(this.scroll_height<this.scroll_height2){
    	this.scroll_height=this.scroll_height2;    
    }
    
    
     this.client_height = window.innerHeight || document.documentElement.clientHeight;
    
    
   //  alert("this.scroll_top:"+this.scroll_top);
    //alert("this.scroll_height:"+this.scroll_height);   
    //alert("this.client_height:"+this.client_height);  
     // alert("document.body.scrollHeight:"+document.body.scrollHeight);
    //this.gId('fdbk_screen').style.height = "1100px";
    //this.gId('fdbk_container').style.top = "250px";
    
    this.gId('fdbk_screen').style.height = this.scroll_height*1.3+"px";
     //this.gId('fdbk_container').style.top = this.scroll_top+(this.scroll_height2*0.2)+"px";
     this.gId('fdbk_container').style.top = this.scroll_top+200+"px";
   // var a1=this.gId('fdbk_container');
    
   // a1.style.top = this.scroll_top+(this.client_height*0.3)+"px";
   
   //var screenWidth=window.screen.width;
   //var screenHeigth=window.screen.height;
   
   //alert(window.screen.width);
   //alert(window.screen.height);
   
   //alert(window.screenLeft);
   //alert(window.screenTop);
   
   //alert(a1.style.width+","+a1.style.height);

   
    
   // a1.style.left=(parseInt(window.screen.width)-parseInt(680))/2-window.screenLeft;   
   // a1.style.top=(parseInt(window.screen.height)-parseInt(340))/2-window.screenTop; 
    
  },
  show: function() { 
  
    if(this.gId('fdbk_iframe').getAttribute("src") == "") {
  
      this.gId('fdbk_iframe').setAttribute("src", this.feedback_url);
      if (this.gId('fdbk_iframe').addEventListener) {
        this.gId('fdbk_iframe').addEventListener("load", GSFN2.loaded, false);
      } else if (this.gId('fdbk_iframe').attachEvent) {
        this.gId('fdbk_iframe').detachEvent("onload", GSFN2.loaded);
        this.gId('fdbk_iframe').attachEvent("onload", GSFN2.loaded);
      }
    }
    this.set_position();
    this.gId('fdbk_overlay').style.display = "block";
  },
  hide: function() {
  
  	this.gId('fdbk_iframe').setAttribute("src", this.feedback_url);
      if (this.gId('fdbk_iframe').addEventListener) {
        this.gId('fdbk_iframe').addEventListener("load", GSFN.loaded, false);
      } else if (this.gId('fdbk_iframe').attachEvent) {
        this.gId('fdbk_iframe').detachEvent("onload", GSFN.loaded);
        this.gId('fdbk_iframe').attachEvent("onload", GSFN.loaded);
      }
  
  
    this.gId('fdbk_overlay').style.display = "none";
  },
  loaded: function() {
    GSFN2.gId('fdbk_iframe').className = "loaded";
  },
  gId: function(id) {
    return document.getElementById(id);
  }
}

//------------------END-----------------GSFN------------------------------
