function drawportlet(sportlettype ,npagesize , skinid , nproductid , ntopicid , pageid , nParententityid , nParentTypeid , nParentValueid , peid ,ptid, pvid, reqeditaction , nEntityValue , nparentValueId1 , nparentTypeId1 , nparentEntityId1 , sContext , showalltype, inframeonly, nregionid ,countfr   ,sType ,nTemplateidvalue11 , ncolpos , seccaption , vertseparation ,backcolor,roundedcorner , simagepathconst, scolumnnum, nentityidfound , ntypeidfound ,rsSectionListtype ,isteam, scontext ,shownewtoeveryone,npostnew , isfriend,  Tablebordercolor, iseditentity, shieght ,nTypeIdval,sdatevalpassed ,showconfig,srcurl ,sEmpid, nosetting, newbtn , captionnew, contenttypeval, querytype , firstsection, nnum3, nmodsecid,showrem,sRefreshtype, ssitename, viewall ,ssecentityvalue, noremove, shoppara, divskinval,stext1value,newp,sctype, paget,subv, deptid, deptkey, oldstyle, timeoffset, editall, txt1val, helptextv,hastheme, nshowtext, ssectiontype11,nentityidval1, ssectionentitytype1,  ssectionentitycap, nolink, keywordv)
{
//alert("seccaption " + seccaption  + " countfr " + countfr + "npostnew" + npostnew + "nnum3" + nnum3)
var ie4=document.all
var ns6=document.getElementById&&!document.all






if (ie4||ns6){
	var leftsrc1
	leftsrc1 =srcurl
	
	if (countfr=="0" ||  countfr=="1" ){
		
		//alert("url" + seccaption + sportlettype)
	}

	leftsrc1 =leftsrc1 + "&pagesize=" + npagesize   + "&skinid=" + skinid + "&productid=" + nproductid + "&Topicid=" + ntopicid  + "&timeoffset=" + timeoffset + "&nn3=" + nnum3
	if (deptid != ""){
		leftsrc1 =leftsrc1 + "&deptid=" + deptid + "&deptkey=" + deptkey

	}
	if (sportlettype == "3")
	{

		leftsrc1=leftsrc1 + "&pageid=" + pageid + "&parententityidvalue=" + nParententityid + "&parentTypeid=" + nParentTypeid + "&parentValueid=" + nParentValueid 
	}

	else if (sportlettype == "6")
	{	
					
		leftsrc1=leftsrc1 + "&pageid=" + pageid + "&parententityidvalue=" + nParententityid + "&parentTypeid=" + nParentTypeid +  "&parentValueid=" + nParentValueid + "&entityvalue=" + nParentValueid 
	}
	else
	{	

			
		if  (nEntityValue == "" )
			{
				leftsrc1=leftsrc1 + "&pageid=" + pageid + "&parententityidvalue="+  nParententityid + "&parentTypeid=" + nParentTypeid + "&parentValueid=" + nParentValueid 
			}
		else
			{
				if (countfr=="0" ||  countfr=="1" ){
		
					//alert("url" + sContext + ":" + leftsrc1 + ":" + reqeditaction + ":" + showalltype + ":" + inframeonly)
					
				}
				if ( sContext  =="1" ) 
				{
							if ( showalltype =="" ) { 
								leftsrc1=leftsrc1 + "&pageid=" + pageid + "&entityid="+ nParententityid + "&Typeid=" + nParentTypeid  + "&parententityidvalue=" + nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 +  "&EntityValueid=" + nParentValueid
							} else
							{
								leftsrc1=leftsrc1 + "&pageid=" + pageid + "&entityid="+ nParententityid + "&Templateid=" + nParentTypeid  + "&parententityidvalue=" + nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 +  "&EntityValueid=" + nParentValueid


							}
				}
				else if  ( sContext  =="2")  
				{
							//alert("XXX" + reqeditaction)
							if (reqeditaction  == ""  && showalltype =="")  {
								leftsrc1=leftsrc1 + "&pageid=" + pageid + "&entityid=" + nParententityid + "&Typeid=" + nTypeIdval + "&Entityvalue=" + nParentValueid + "&parententityidvalue=" + nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 +  "&EntityValueid=" + nParentValueid
							} else if  (reqeditaction  == "" && showalltype =="1"  ){
								leftsrc1=leftsrc1 + "&pageid=" + pageid + "&entityid=" + nParententityid + "&templateid=" + nTypeIdval + "&Entityvalue=" + nParentValueid + "&parententityidvalue=" + nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 +  "&EntityValueid=" + nParentValueid
							} else if (reqeditaction  == "-1"  && showalltype =="" ) {
								//leftsrc1=leftsrc1 + "&pageid1=-1&entityid="+ nParententityid + "&Typeid=" + nTypeIdval   + "&parententityidvalue="+  nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 +  "&EntityValueid=" + nParentValueid
								leftsrc1=leftsrc1 + "&pageid1=-1"   + "&parententityidvalue="+  nParententityid + "&parentTypeid=" + nParentTypeid  + "&parentValueid=" + nParentValueid +  "&EntityValueid=" + nParentValueid
							} else if (reqeditaction  == "-1"  && showalltype =="1" ) {
								leftsrc1=leftsrc1 + "&pageid=-1&entityid=" +  nParententityid + "&Templateid=" + nTypeIdval   + "&parententityidvalue=" +  nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 +  "&EntityValueid=" + nParentValueid
							} else if (reqeditaction  == "1" && (inframeonly =="1") && showalltype ==""  ) {
								leftsrc1=leftsrc1 + "&pageid3=" + pageid + "&entityid="+ nParententityid + "&Typeid=" + nTypeIdval   + "&parententityidvalue="+ nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 + "&editaction=1" +  "&EntityValue=" + nParentValueid
							
							} else if (reqeditaction == "1" && (inframeonly =="1") && showalltype =="1"  ) {
								leftsrc1=leftsrc1 + "&pageid=" + pageid + "&entityid="+ nParententityid + "&templateid=" + nTypeIdval   + "&parententityidvalue="+ nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 + "&editaction=1" +  "&EntityValue=" + nParentValueid
							
							} else if (reqeditaction == "1" && inframeonly != "1" ) {
								leftsrc1=leftsrc1 + "&pageid=" + pageid + "&entityid=" +  nParententityid + "&Typeid=" + nTypeIdval   + "&parententityidvalue="+ nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 + "" +  "&EntityValue=" + nParentValueid
							}
				}
				else
				{	  
					leftsrc1=leftsrc1 + "&pageid=" + pageid + "&parententityidvalue="+ nParententityid + "&parentTypeid=" +nTypeIdval + "&parentValueid=" + nParentValueid

				}

				if (countfr=="0" ||  countfr=="1" ){
		
					//alert("url XXX" + sContext  + leftsrc1)
				}

			

		}
	}
				
	var leftsrc2
				
	leftsrc2 =leftsrc1
	if(nEntityValue=="-11" && reqeditaction=="-1"){
		//alert("here")
		//alert(leftsrc1)
		leftsrc1=leftsrc1 + "&sems=" + stext1value
		//alert(leftsrc1)
	}	
				
	leftsrc1 = leftsrc1 + "&framenumbervalue=" + countfr   +  "&empid=" + sEmpid + "&orgid=-1&roleid1=-1&sectionid=" + sType + "&txt1=" + txt1val + "&nTemplateidvalue11=" + nTemplateidvalue11 

	leftsrc1=leftsrc1 + "&peid=" + peid  + "&ptid=" + ptid + "&subv=" + subv + "&sctype=" +sctype + "&pvid=" + pvid + "&n3=" + nnum3 + "&n13=" + nmodsecid + "&rettyp=" +  sRefreshtype + "&Sitenamevalue1=" + ssitename 
 
	if (iseditentity== "0" || inframeonly =="1" ) {
		leftsrc1=leftsrc1 + "&fromframe=1"
	} else {
		leftsrc1=leftsrc1 +  "&NOHTML=1&fromportal=1" 

	}
	
	if (nregionid != "-1" ) {
		leftsrc1=leftsrc1 + "&regionid=" + nregionid
	}

	leftsrc1=leftsrc1 + "&tw=11" 



	//alert("url" +scaption + ":" + leftsrc1)			
	var scaption 
	//alert(leftsrc1)
			
	if (keywordv == "")
	{
		scaption = seccaption + " "  + "</td>" 
	}

	if (keywordv != "")
	{
		scaption = seccaption + " ("  + keywordv  + ")</td>" 
	}
	
	if (roundedcorner == "0" ) {		
		document.write( " <div id=portletframe" + countfr + "><table  width=100% border=1 align=center cellpadding=0 cellspacing=0 bordercolor='" + Tablebordercolor    + "' bgcolor ='"+ backcolor + "'> " )
	}
	if (roundedcorner == "1" ) {		
		document.write( " <div id=portletframe" + countfr + "><table  width=100% border=0 align=center cellpadding=0 cellspacing=0 bordercolor='" + Tablebordercolor    + "' bgcolor ='"+ backcolor + "'> " )
	}
	if (roundedcorner == "2" ) {	
	    if(shoppara=="0"){	
		if (skinid =="9" || skinid =="10" || skinid =="12" || skinid =="1") {
		document.write( " <div id=portletframe" + countfr + "><div  id=bocontent" + countfr + " class=roundedcornr_box_" + divskinval+ "><div  id=tcontent" + countfr + " class=roundedcornr_top_" + divskinval + "><div></div></div><div id=rcontent" + countfr + "  class=roundedcornr_content_" + divskinval + "><p><table  width=100% border=0 align=center cellpadding=1 cellspacing=1 > " )
		}
		if (skinid !="9" && skinid !="10") {
		document.write( " <div id=portletframe" + countfr + "><div  id=bocontent" + countfr + " class=roundedcornr_box_" + divskinval+ "><div  id=tcontent" + countfr + " class=roundedcornr_top_" + divskinval + "><div></div></div><div id=rcontent" + countfr + "  class=roundedcornr_content_" + divskinval + "><p><table  width=96% border=0 align=center cellpadding=1 cellspacing=1 > " )
		}

		}
	    if(shoppara=="1"){	
		if (skinid =="9"  || skinid =="10" || skinid =="12" || skinid =="1" ) {
			document.write( " <div id=portletframe" + countfr + "><div  id=bocontent" + countfr + " class=roundedcornr_box_" + divskinval+ "><div id=tcontent" + countfr + "  class=roundedcornr_top_" + divskinval + "><div></div></div><div id=rcontent" + countfr + "  class=roundedcornr_content_" + divskinval + "><table  width=100% border=0 align=center cellpadding=1 cellspacing=1 > " )
			}
		if (skinid !="9" && skinid !="10" && skinid !="12" && skinid !="1") {
			document.write( " <div id=portletframe" + countfr + "><div  id=bocontent" + countfr + " class=roundedcornr_box_" + divskinval+ "><div id=tcontent" + countfr + "  class=roundedcornr_top_" + divskinval + "><div></div></div><div id=rcontent" + countfr + "  class=roundedcornr_content_" + divskinval + "><table  width=96% border=0 align=center cellpadding=1 cellspacing=1 > " )
			}

		}
		
	}

			var snewURL 
			if (nEntityValue  != "" )
			{
				snewURL = "display.asp?pageid=1&parententityid=" + nparentEntityId1  + "&parenttypeid=" + nparentTypeId1  + "&parentvalueid=" + nparentValueId1  + "&topicid=" + ntopicid + "&productid=" + nproductid +  "&entityid=" + nentityidfound  +  "&typeid=" + ntypeidfound + "&peid=" + peid  + "&ptid=" + ptid  + "&pvid=" + pvid
			} else
			{
				snewURL = "display.asp?pageid=" + pageid + "&parententityid=" + nParententityid + "&parenttypeid=" + nParentTypeid + "&parentvalueid=" + nParentValueid + "&topicid=" + ntopicid + "&productid=" + nproductid +  "&entityid=" + nentityidfound  +  "&typeid=" + ntypeidfound 
			
			}
			snewURL = snewURL + "&sctype=" + sctype;

	document.write( "<tr height='17' class=PortletHeader > <td height='17' valign=top><table border=0 height='17' cellspacing=0 cellpadding= 0 width='100%' ><tr valign=middle>"		)
	var frameid 
	frameid ="leftframe" + countfr
	if (roundedcorner == "1" ) {

		document.write( "<td width=20 ><img src=" + simagepathconst + "/corner22.gif  width=20 height=17 border=0> </td> ")
	}

	if ( scontext==""  && nEntityValue =="" ){
		if (nolink == "1" )
		{
         		document.write( "<td  nowrap >&nbsp;<font class=PortletHeadertext> " + scaption + " </font></td> <td align=right class=PortletHeaderline> ")
		}
		if (nolink != "1" )
		{
         		document.write( "<td  nowrap >&nbsp;<a href='"+ snewURL  + "&paget=" + paget + "&xxsctype=" + sctype  + "&sectionid=" + sType +  "&editaction=-1&entityvalue=-11' target = _top><font class=PortletHeadertext> " + scaption + " </font></a></td> <td align=right class=PortletHeaderline> ")
		}

	}
	else{

        	document.write( "<td  nowrap >&nbsp;<font class=PortletHeadertext> " + scaption + " </font></td> <td align=right class=PortletHeaderline> ")

	}
		

	        //alert('scontext' +scaption + ':' + scontext)
		if (scolumnnum != "5" && nosetting !="1"  )
		{





    			//alert('cap' + captionnew)
        		var leftsrcver = leftsrc1 + "&Tvid=241"


				if (scontext== "" && rsSectionListtype != "2" && viewall=="0") { 
				}
				if (scontext== "" && rsSectionListtype != "2" && viewall=="1") { 
				}
				if (sType =="82" ) 
				{
					
					document.write( " &nbsp;&nbsp;<A onclick=history.back(); border=0 alt= 'Go Back'  ><font class=PortletHeaderline>Back</a></font>&nbsp;")
				}
				if (scontext== "" && showconfig == "1" && rsSectionListtype !="2"  ){
					if (contenttypeval=="4"){
						document.write("<input type=button value =Edit class=capbutton1  border=0   onclick=\"javascript:window.location.href='display.asp?pageid=" + pageid+ "&parententityid=" + nParententityid + "&parenttypeid=" + nParentTypeid + "&parentvalueid=" + nParentValueid + "&topicid=" + ntopicid+ "&1=" + newp + "&productid=" + nproductid + "&showconfigscreen=2&sectionid=" + sType +"'\" alt='Setup the section'>&nbsp;" )
					}

					if (contenttypeval!="4"){
						document.write(" <img src=content/images/dropdown.gif  border=0   alt='Setting ' onclick=\"fixedtooltip('contentedit.asp?viewtype=3&entityid=" + nentityidfound  + "&typeid=" +ntypeidfound + "&sctype=" +sctype + "&pageid=" + pageid+ "&parententityid=" + nParententityid + "&parentTypeid=" + nParentTypeid + "&parentValueid=" + nParentValueid + "&Topicid=" + ntopicid + "&productid=" + nproductid + "&sectionid=" +sType + "&Templateentid=" + nentityidfound + "&Templatetypid=" + ntypeidfound + "&timelast=" + sdatevalpassed + "', this, event, '800px', '320px')\"  >&nbsp;" )
					}


				} 
				else if ( scontext =="" && showconfig == "1" && rsSectionListtype =="2" ) {
					document.write("<input type=button class=capbutton1 onclick=\"javascript:\"fixedtooltip('contentedit.asp?viewtype=3&entityid=" + nentityidfound  + "&sctype=" +sctype + "&typeid=" +ntypeidfound + "&pageid=" + pageid+ "&parententityid=" + nParententityid+ "&parentTypeid=" + nParentTypeid + "&parentValueid=" + nParentValueid + "&Topicid=" + ntopicid + "&productid=" + nproductid + "&sectionid=" +sType + "&Templateentid=" + nentityidfound + "&Templatetypid=" + ntypeidfound + "&timelast=" + sdatevalpassed + "', this, event, '900px', '550px')\" ><font class=PortletHeaderline value ='Modify Content' > |&nbsp;")
				}

           		if (showconfig == "1" && showrem == "1" && noremove=="0") {
				if (oldstyle=="1"){
           			//document.write("<a href# onclick=\"js:CloseFrame('" + countfr + "', '" + sType + "')\"><img src=" + simagepathconst+ "/closef.gif   height=16  border=0 ></a>&nbsp;")
				}

				if (oldstyle!="1"){
           			//document.write("<a href# onclick=\"js:CloseFrame1('" + countfr + "', '" + sType + "')\"><img src=" + simagepathconst+ "/closef.gif   height=16  border=0 ></a>&nbsp;")
				}

			}else{
          		if (showrem == "1" && noremove=="0") {
           			//document.write("<a href=# onclick=\"js:CloseFrame('" + countfr + "', '" + sType + "')\"><img src=" + simagepathconst+ "/closef.gif   height=16  border=0 ></a>&nbsp;")
			}}
		}

		document.write("</td><td width=17>")
		if (roundedcorner== "1") {
			document.write("<img src= " + simagepathconst + "/corner11.gif height=17 border=0> ")   
		}

		//alert(countfr + "hidhtmlv" + countfr);
		var hidhtmlv= window.document.getElementById("hidhtmlv" + countfr ).innerHTML;
		if ( hidhtmlv != "")
		{
		document.write("</td></tr><tr><td colspan=2 > " + hidhtmlv + "")

		}
		var newbtnw =0
		//alert(countfr );

		//alert("hasnewskinxx " + sstr )
			var snewURL 
			if (nEntityValue  != "" )
			{
				snewURL = "display.asp?pageid=1&parententityid=" + nparentEntityId1  + "&parenttypeid=" + nparentTypeId1  + "&parentvalueid=" + nparentValueId1  + "&topicid=" + ntopicid + "&productid=" + nproductid +  "&entityid=" + nentityidfound  +  "&typeid=" + ntypeidfound + "&peid=" + peid  + "&ptid=" + ptid  + "&pvid=" + pvid
			} else
			{
				snewURL = "display.asp?pageid=" + pageid + "&parententityid=" + nParententityid + "&parenttypeid=" + nParentTypeid + "&parentvalueid=" + nParentValueid + "&topicid=" + ntopicid + "&productid=" + nproductid +  "&entityid=" + nentityidfound  +  "&typeid=" + ntypeidfound 
			
			}
			snewURL = snewURL + "&sctype=" + sctype;

		var newbtnw =0
		var sposthtml =""


			if ( nParententityid =='25' && nParentTypeid =='243' && paget=="" )
			{

			}
			else
                        {
				snewURL  = snewURL  + "&editaction=1&entityvalue=-11"
				sposthtml ="<b>[</b>&nbsp;<a  href = '" + snewURL  + "' target=_top><span class= Menubuttonc   onMouseout=\"hideddrivetip()\" onmouseover= \"ddrivetip('Create or Post a New entry', '100')\"  value ='" + captionnew + "' >"+ captionnew +"</span></a>&nbsp;<b>]</b>"

				if (nshowtext=="1")
				{

					snewurlval = "editentity.asp?closetypev=1&productid=" + nproductid + "&Topicid=" + ntopicid + "&timeoffset=0&pageid=1&entityid=" + nentityidval1 +"&Typeid=" + ssectionentitytype1 + "&parententityidvalue=" + nParententityid + "&parentTypeid="  + nParentTypeid + "&parentValueid="  + nParentValueid + "&editaction=1&empid=8&sectionid=82&fromframe=1&Sitenamevalue1zz=&timeoffsetv=300&sctype="+ sctype + "&keyword="+ keywordv;
					sposthtml ="<div id =showwin"+ ssectiontype11 + " name = showwin"+ ssectiontype11 + " ><input style='BORDER: #d1c7ac 1px solid; BACKGROUND-COLOR: #ffffc1' onfocus=\"fixedtooltipmaxwin1('showwin"+ ssectiontype11 + "','" + snewurlval  + "',  '700px', '450px');\" maxlength=50 size=40 name=textv77 value='" + ssectionentitycap+ "'/></div> "


				} 

			}

		



		if (scolumnnum != "5" && nosetting !="1"  )
		{

			if (newbtn=="1"){
			if (rsSectionListtype !="2") {
				//alert("dd" +":" + shownewtoeveryone +":" + isfriend )
				if (  (isteam =="1"  || editall=="True" || (npostnew =="1" && shownewtoeveryone =="1")  || (npostnew =="1" && isfriend == "1" ))) {
				    if (captionnew!=""){
					if (isteam =="1"){
					//document.write( "<input type=button class=capbutton1 onclick=\"javascript:window.location.href='" + snewURL  + "&editaction=1&entityvalue=-11'\"  value = '" + captionnew + "'  alt='Create or Add new entry ' > &nbsp;")
						document.write( "</td></tr></table></td></tr><tr height =4 ><td>  </td></tr><tr><td>&nbsp; "  + sposthtml  + "")
						 newbtnw =1;
					}

					if (isteam !="1"){
					//document.write( "<input type=button class=capbutton1 onclick=\"javascript:window.location.href='" + snewURL  + "&editaction=1&entityvalue=-11'\"  value = '" + captionnew + "'  alt='Create or Add new entry ' > &nbsp;")
						document.write( "</td></tr></table></td></tr><tr height =4 ><td>  </td></tr><tr><td>&nbsp; "  + sposthtml  + "")
						newbtnw =1;
					}
				    }
           			} 
			}
			}
			//alert("xxyyzzaabnewbtn" + newbtn + " nParententityid" + nParententityid + " nParentTypeid" + nParentTypeid + " paget" + paget)
			if (newbtn=="0"){
				//alert("1")
			   if ( nParententityid =='25' && nParentTypeid =='243' && paget=="" ) {
				//alert("11")
				var snewURLa =  "display.asp?pageid=" + pageid + "&parententityid=4&parenttypeid=18&parentvalueid=" + sEmpid + "&topicid=-1&productid=-1&entityid=" + nentityidfound  +  "&typeid=" + ntypeidfound + "&sctype=" + sctype + "&catid=" + nParentValueid + "&regid=" + ntopicid ; 
				//alert("112")
			     if (rsSectionListtype !="2" ){
				//if ( scontext=="" && (isteam =="1"  || editall=="True" || (npostnew =="1" && shownewtoeveryone =="1") ||  ( nParententityid =="25" && nParentTypeid =="243" && paget=="" )  || (npostnew =="1" && isfriend == "1" ))) {
				    if (captionnew!=""){
					if (isteam =="1"){
					document.write( "</td></tr></table></td></tr><tr height =4 ><td>  </td></tr><tr><td>&nbsp;<b>[</b>&nbsp;<span class=Menubuttonc onclick=\"javascript:window.location.href='" + snewURLa  + "&editaction=1&entityvalue=-11'\"  value = '" + captionnew + "'  alt='Create or Add new  ' >"  + captionnew + "</span>&nbsp;<b>]</b>")
					newbtnw =1;
					}

					if (isteam !="1"){
					document.write( "</td></tr></table></td></tr><tr height =4 ><td>  </td></tr><tr><td>&nbsp;<b>[</b>&nbsp;<span class=Menubuttonc onclick=\"javascript:window.location.href='" + snewURLa  + "&editaction=1&entityvalue=-11'\"  value = '" + captionnew + "'  alt='Create or Add new  ' >"  + captionnew + "</span>&nbsp;<b>]</b>")
					newbtnw =1;
					}

				    }
           			//} 
			      }
			    }
			}
		}



		if (newbtnw ==0) {
			document.write("</td></tr></table></td></tr>")
		}
		if (newbtnw ==1) {
			document.write("</td></tr>")
		}

		if (roundedcorner == "0" ) {
			document.write(" <tr> <td > <table  cellpadding=0 cellspacing=4 border=0 width='100%' bordercolor=" + Tablebordercolor + " bgcolor=white ><tr><td> " )
		}
		if (roundedcorner == "1" ) {
			document.write(" <tr> <td > <table  cellpadding=0 cellspacing=4 border=1 width='100%' bordercolor=" + Tablebordercolor + " bgcolor=white ><tr><td> " )
		}
		if (roundedcorner == "2" ) {
			document.write("  <tr> <td > <table  cellpadding=0 cellspacing=4 border=0 width='100%'  > <tr><td> " )
		}
		
			if (rsSectionListtype !="2")
			{
				//alert("ileftsrc1 " + leftsrc1 + "inframeonly " + inframeonly)
				if (iseditentity == "0" || inframeonly== "1" ) {
					//alert("1")
					document.write(" <input type =hidden name = hidurl" + countfr   + " id = hidurl" + countfr   + " value ='" + leftsrc1  + "'> <div id = tp" + ssecentityvalue  + "  name = tp" + ssecentityvalue  + " > </div><div  name='leftframe" + countfr  + "_2' " + " id='leftframe" + countfr   + "_2'> </div> <div style='border-style:none' name='leftframe" + countfr   + "_1'  id='leftframe" + countfr  + "_1'>")	

					//alert("ileftsrc1 " + leftsrc1)
					document.write(" <input type =hidden name = hidurlhasframe" + countfr   + " id =  hidurlhasframe" + countfr   + " value ='0'>")
					if (ns6){ 
 						document.write( "<IFRAME SRC=" + leftsrc1 + " name=leftframe"  + countfr   + " ID=leftframe" + countfr + "  width ='100%' HEIGHT=  " + shieght + "  frameborder=no  > </IFRAME>")
					} else{

 						document.write( "<IFRAME SRC=" + leftsrc1 + " name=leftframe"  + countfr   + " ID=leftframe" + countfr + " frameborder=no SCROLLING=auto  STYLE=' z-index:-1'  width =100% HEIGHT=  " + shieght  + "  ALLOWTRANSPARENCY=true frameborder=no ></IFRAME>")


					}
				} else {
					//alert("2")
					document.write("<input type =hidden name = hidurl" + countfr   + " id = hidurl" + countfr   + " value ='" + leftsrc1  + "'><div id = tp" + ssecentityvalue  + "  name = tp" + ssecentityvalue  + " > </div> <div  name='leftframe" + countfr   + "_2' " + " id='leftframe" + countfr   + "_2'> </div> <div style='border-style:none' height=" + shieght+  " name='leftframe" + countfr   + "_1'  id='leftframe" + countfr   + "_1'>")	

					if (querytype=="0"){
						document.write(" <input type =hidden name = hidurlhasframe" + countfr   + " id =  hidurlhasframe" + countfr   + " value ='1'> <img src='" + simagepathconst + "/loading.gif' onmouseover=style.cursor = 'hand';  border=0 alt='Loading window' >")
					}

					if (querytype!="0" && firstsection== "1" ){
						document.write(" <input type =hidden name = hidurlhasframe" + countfr   + " id =  hidurlhasframe" + countfr   + " value ='" + querytype + "'> <img src='" + simagepathconst + "/loading.gif' onmouseover=style.cursor = 'hand';  border=0 alt='Loading window' >")

					}

					if (querytype!="0" && firstsection!= "1" ){
						document.write(" <input type =hidden name = hidurlhasframe" + countfr   + " id =  hidurlhasframe" + countfr   + " value ='0'> <img src='" + simagepathconst + "/loading.gif' onmouseover=style.cursor = 'hand';  border=0 alt='Loading window' >")

					}


				}
				
				

			}

			document.write("</div></td></tr></table>")
			document.write("</td></tr>")
			
			
			//document.write("<tr HEIGHT=" + vertseparation + "><td></td></tr>")
		if (roundedcorner != "2" ) {
			document.write("</table></div>")
		}
		if (roundedcorner == "2" ) {
	    		if(shoppara=="0"){	
				document.write("</table></P></div><div id=bcontent" + countfr + "  class=roundedcornr_bottom_" + divskinval+ "><div></div></div></div></div>")

			}
	    		if(shoppara=="1"){	
				document.write("</table></div><div id=bcontent" + countfr + " class=roundedcornr_bottom_" + divskinval+ "><div></div></div></div></div>")

			}

		}			
		//document.write("</div>")
}
}





function drawportlet11(sportlettype ,npagesize , skinid , nproductid , ntopicid , pageid , nParententityid , nParentTypeid , nParentValueid , peid ,ptid, pvid, reqeditaction , nEntityValue , nparentValueId1 , nparentTypeId1 , nparentEntityId1 , sContext , showalltype, inframeonly, nregionid ,countfr   ,sType ,nTemplateidvalue11 , ncolpos , seccaption , vertseparation ,backcolor,roundedcorner , simagepathconst, scolumnnum, nentityidfound , ntypeidfound ,rsSectionListtype ,isteam, scontext ,shownewtoeveryone,npostnew , isfriend,  Tablebordercolor, iseditentity, shieght ,nTypeIdval,sdatevalpassed ,showconfig,srcurl ,sEmpid, nosetting, newbtn , captionnew, contenttypeval, querytype , firstsection, nnum3, nmodsecid,showrem,sRefreshtype, ssitename, viewall ,ssecentityvalue, noremove, shoppara, divskinval,stext1value,newp,sctype, paget,subv, deptid, deptkey, oldstyle, timeoffset, editall, txt1val, helptextv,hastheme, nshowtext, ssectiontype11,nentityidval1,  ssectionentitytype1, ssectionentitycap, nolink, keywordv)
{
//alert("here")
//alert("xxxxseccaption " + seccaption  + " countfr " + countfr + "divskinval" + divskinval)
var ie4=document.all
var ns6=document.getElementById&&!document.all
var hasnewskin= 'True' 

var sstr = "";

if (ie4||ns6){
	var leftsrc1
	leftsrc1 =srcurl
	
	if (countfr=="0" ||  countfr=="1" ){
		
		//alert("url" + seccaption + sportlettype)
	}

	leftsrc1 =leftsrc1 + "&pagesize=" + npagesize   + "&skinid=" + skinid + "&productid=" + nproductid + "&Topicid=" + ntopicid  + "&timeoffset=" + timeoffset + "&nn3=" + nnum3
	if (deptid != ""){
		leftsrc1 =leftsrc1 + "&deptid=" + deptid + "&deptkey=" + deptkey

	}
	if (sportlettype == "3")
	{

		leftsrc1=leftsrc1 + "&pageid=" + pageid + "&parententityidvalue=" + nParententityid + "&parentTypeid=" + nParentTypeid + "&parentValueid=" + nParentValueid 
	}

	else if (sportlettype == "6")
	{	
					
		leftsrc1=leftsrc1 + "&pageid=" + pageid + "&parententityidvalue=" + nParententityid + "&parentTypeid=" + nParentTypeid +  "&parentValueid=" + nParentValueid + "&entityvalue=" + nParentValueid 
	}
	else
	{	

			
		if  (nEntityValue == "" )
			{
				leftsrc1=leftsrc1 + "&pageid=" + pageid + "&parententityidvalue="+  nParententityid + "&parentTypeid=" + nParentTypeid + "&parentValueid=" + nParentValueid 
			}
		else
			{
				if (countfr=="0" ||  countfr=="1" ){
		
					//alert("url" + sContext + ":" + leftsrc1 + ":" + reqeditaction + ":" + showalltype + ":" + inframeonly)
					
				}
				if ( sContext  =="1" ) 
				{
							if ( showalltype =="" ) { 
								leftsrc1=leftsrc1 + "&pageid=" + pageid + "&entityid="+ nParententityid + "&Typeid=" + nParentTypeid  + "&parententityidvalue=" + nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 +  "&EntityValueid=" + nParentValueid
							} else
							{
								leftsrc1=leftsrc1 + "&pageid=" + pageid + "&entityid="+ nParententityid + "&Templateid=" + nParentTypeid  + "&parententityidvalue=" + nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 +  "&EntityValueid=" + nParentValueid


							}
				}
				else if  ( sContext  =="2")  
				{
							//alert("XXX" + reqeditaction)
							if (reqeditaction  == ""  && showalltype =="")  {
								leftsrc1=leftsrc1 + "&pageid=" + pageid + "&entityid=" + nParententityid + "&Typeid=" + nTypeIdval + "&Entityvalue=" + nParentValueid + "&parententityidvalue=" + nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 +  "&EntityValueid=" + nParentValueid
							} else if  (reqeditaction  == "" && showalltype =="1"  ){
								leftsrc1=leftsrc1 + "&pageid=" + pageid + "&entityid=" + nParententityid + "&templateid=" + nTypeIdval + "&Entityvalue=" + nParentValueid + "&parententityidvalue=" + nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 +  "&EntityValueid=" + nParentValueid
							} else if (reqeditaction  == "-1"  && showalltype =="" ) {
								//leftsrc1=leftsrc1 + "&pageid1=-1&entityid="+ nParententityid + "&Typeid=" + nTypeIdval   + "&parententityidvalue="+  nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 +  "&EntityValueid=" + nParentValueid
								leftsrc1=leftsrc1 + "&pageid1=-1"   + "&parententityidvalue="+  nParententityid + "&parentTypeid=" + nParentTypeid  + "&parentValueid=" + nParentValueid +  "&EntityValueid=" + nParentValueid
							} else if (reqeditaction  == "-1"  && showalltype =="1" ) {
								leftsrc1=leftsrc1 + "&pageid=-1&entityid=" +  nParententityid + "&Templateid=" + nTypeIdval   + "&parententityidvalue=" +  nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 +  "&EntityValueid=" + nParentValueid
							} else if (reqeditaction  == "1" && (inframeonly =="1") && showalltype ==""  ) {
								leftsrc1=leftsrc1 + "&pageid3=" + pageid + "&entityid="+ nParententityid + "&Typeid=" + nTypeIdval   + "&parententityidvalue="+ nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 + "&editaction=1" +  "&EntityValue=" + nParentValueid
							
							} else if (reqeditaction == "1" && (inframeonly =="1") && showalltype =="1"  ) {
								leftsrc1=leftsrc1 + "&pageid=" + pageid + "&entityid="+ nParententityid + "&templateid=" + nTypeIdval   + "&parententityidvalue="+ nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 + "&editaction=1" +  "&EntityValue=" + nParentValueid
							
							} else if (reqeditaction == "1" && inframeonly != "1" ) {
								leftsrc1=leftsrc1 + "&pageid=" + pageid + "&entityid=" +  nParententityid + "&Typeid=" + nTypeIdval   + "&parententityidvalue="+ nparentEntityId1 + "&parentTypeid=" + nparentTypeId1 + "&parentValueid=" + nparentValueId1 + "" +  "&EntityValue=" + nParentValueid
							}
				}
				else
				{	  
					leftsrc1=leftsrc1 + "&pageid=" + pageid + "&parententityidvalue="+ nParententityid + "&parentTypeid=" +nTypeIdval + "&parentValueid=" + nParentValueid

				}

				if (countfr=="0" ||  countfr=="1" ){
		
					//alert("url XXX" + sContext  + leftsrc1)
				}

			

		}
	}
				
	var leftsrc2
				
	leftsrc2 =leftsrc1
	if(nEntityValue=="-11" && reqeditaction=="-1"){
		//alert("here")
		//alert(leftsrc1)
		leftsrc1=leftsrc1 + "&sems=" + stext1value
		//alert(leftsrc1)
	}	
				
	leftsrc1 = leftsrc1 + "&framenumbervalue=" + countfr   +  "&empid=" + sEmpid + "&orgid=-1&roleid1=-1&sectionid=" + sType + "&txt1=" + txt1val + "&nTemplateidvalue11=" + nTemplateidvalue11 

	leftsrc1=leftsrc1 + "&peid=" + peid  + "&ptid=" + ptid + "&subv=" + subv + "&sctype=" +sctype + "&pvid=" + pvid + "&n3=" + nnum3 + "&n13=" + nmodsecid + "&rettyp=" +  sRefreshtype + "&Sitenamevalue1=" + ssitename 
 
	if (iseditentity== "0" || inframeonly =="1" ) {
		leftsrc1=leftsrc1 + "&fromframe=1"
	} else {
		leftsrc1=leftsrc1 +  "&NOHTML=1&fromportal=1" 

	}
	
	if (nregionid != "-1" ) {
		leftsrc1=leftsrc1 + "&regionid=" + nregionid
	}

	leftsrc1=leftsrc1 + "&tw=11" 



	//alert("url" +scaption + ":" + leftsrc1)			
	var scaption 
	//alert(leftsrc1)
			
	scaption = seccaption +  "" 

			var snewURL 
			if (nEntityValue  != "" )
			{
				snewURL = "display.asp?pageid=1&parententityid=" + nparentEntityId1  + "&parenttypeid=" + nparentTypeId1  + "&parentvalueid=" + nparentValueId1  + "&topicid=" + ntopicid + "&productid=" + nproductid +  "&entityid=" + nentityidfound  +  "&typeid=" + ntypeidfound + "&peid=" + peid  + "&ptid=" + ptid  + "&pvid=" + pvid
			} else
			{
				snewURL = "display.asp?pageid=" + pageid + "&parententityid=" + nParententityid + "&parenttypeid=" + nParentTypeid + "&parentvalueid=" + nParentValueid + "&topicid=" + ntopicid + "&productid=" + nproductid +  "&entityid=" + nentityidfound  +  "&typeid=" + ntypeidfound 
			
			}
			snewURL = snewURL + "&sctype=" + sctype;

//alert("hasnewskinyy "  + sstr)
if (hasnewskin== 'True' ){
	
	//alert("here string valbef " + divskinval)
	if (hastheme== "" ){
		if (nolink == "1" )
		{
			sstr = sstr + "<div id=rcontent" + countfr   + " class=" + divskinval + ">  <div id=tcontent" + countfr   + " class=" + divskinval + "_head><h2> " + scaption + " </font>" 
		}
		if (nolink != "1" )
		{
			sstr = sstr + "<div id=rcontent" + countfr   + " class=" + divskinval + ">  <div id=tcontent" + countfr   + " class=" + divskinval + "_head><a href='"+ snewURL  + "&paget=" + paget + "&xxsctype=" + sctype  + "&sectionid=" + sType +  "&editaction=-1&entityvalue=-11' target = _top><h2> " + scaption + " </font></a>" 
		}
	}
	if (hastheme== "1" ){
		if (nolink == "1" )
		{
		sstr = sstr + "<div id=rcontent" + countfr   + " class=post>  <div id=tcontent" + countfr   + "  ><h2> " + scaption + " </font>" 
		}
		if (nolink != "1" )
		{
		sstr = sstr + "<div id=rcontent" + countfr   + " class=post>  <div id=tcontent" + countfr   + "  ><a href='"+ snewURL  + "&paget=" + paget + "&xxsctype=" + sctype  + "&sectionid=" + sType +  "&editaction=-1&entityvalue=-11' target = _top><h2> " + scaption + " </font></a>" 
		}

	}

}
		

	      
		if (scolumnnum != "5" && nosetting !="1"  )
		{

   			//alert('cap' + captionnew)
        		var leftsrcver = leftsrc1 + "&Tvid=241"


				if (scontext== "" && rsSectionListtype != "2" && viewall=="0") { 
				}
				if (scontext== "" && rsSectionListtype != "2" && viewall=="1") { 
				}
				if (sType =="82" ) 
				{
					
					sstr = sstr + " &nbsp;&nbsp;<A onclick=history.back(); border=0 alt= 'Go Back'  ><font class=PortletHeaderline>Back</a></font>&nbsp;"
				}
				if (scontext== "" && showconfig == "1" && rsSectionListtype !="2"  ){
					if (contenttypeval=="4"){
						sstr = sstr +"<input type=button value =Edit class=capbutton1  border=0   onclick=\"javascript:window.location.href='display.asp?pageid=" + pageid+ "&parententityid=" + nParententityid + "&parenttypeid=" + nParentTypeid + "&parentvalueid=" + nParentValueid + "&topicid=" + ntopicid+ "&1=" + newp + "&productid=" + nproductid + "&showconfigscreen=2&sectionid=" + sType +"'\" alt='Setup the section'>&nbsp;" 
					}

					if (contenttypeval!="4"){
						sstr = sstr +" <img src=content/images/dropdown.gif  border=0   alt='Setting ' onclick=\"fixedtooltip('contentedit.asp?viewtype=3&entityid=" + nentityidfound  + "&typeid=" +ntypeidfound + "&sctype=" +sctype + "&pageid=" + pageid+ "&parententityid=" + nParententityid + "&parentTypeid=" + nParentTypeid + "&parentValueid=" + nParentValueid + "&Topicid=" + ntopicid + "&productid=" + nproductid + "&sectionid=" +sType + "&Templateentid=" + nentityidfound + "&Templatetypid=" + ntypeidfound + "&timelast=" + sdatevalpassed + "', this, event, '800px', '320px')\"  >&nbsp;" 
					}


				} 
				else if ( scontext =="" && showconfig == "1" && rsSectionListtype =="2" ) {
					sstr = sstr +"<input type=button class=capbutton1 onclick=\"javascript:\"fixedtooltip('contentedit.asp?viewtype=3&entityid=" + nentityidfound  + "&sctype=" +sctype + "&typeid=" +ntypeidfound + "&pageid=" + pageid+ "&parententityid=" + nParententityid+ "&parentTypeid=" + nParentTypeid + "&parentValueid=" + nParentValueid + "&Topicid=" + ntopicid + "&productid=" + nproductid + "&sectionid=" +sType + "&Templateentid=" + nentityidfound + "&Templatetypid=" + ntypeidfound + "&timelast=" + sdatevalpassed + "', this, event, '900px', '550px')\" ><font class=PortletHeaderline value ='Modify Content' > |&nbsp;"
				}

           		if (showconfig == "1" && showrem == "1" && noremove=="0") {
				if (oldstyle=="1"){
           				//sstr = sstr +"<a href# onclick=\"js:CloseFrame('" + countfr + "', '" + sType + "')\"><img src=" + simagepathconst+ "/closef.gif   height=16  border=0 ></a>&nbsp;"
				}

				if (oldstyle!="1"){
           				//sstr = sstr +"<a href# onclick=\"js:CloseFrame1('" + countfr + "', '" + sType + "')\"><img src=" + simagepathconst+ "/closef.gif   height=16  border=0 ></a>&nbsp;"
				}

			}else{
          		if (showrem == "1" && noremove=="0") {
           			//sstr = sstr +"<a href=# onclick=\"js:CloseFrame('" + countfr + "', '" + sType + "')\"><img src=" + simagepathconst+ "/closef.gif   height=16  border=0 ></a>&nbsp;"
			}}
		}


		if (hasnewskin== 'True' ){
			if (hastheme!= "1" ){
				sstr = sstr +"</h2></div><div id=bcontent" + countfr   + " class="  + divskinval + "_body  > <input type=hidden id=colp" + countfr + " name=colp" + countfr + "  value = " + ncolpos + " ><table border=0 height='17' cellspacing=0 cellpadding= 0 width='95%' >"
			}
			if (hastheme== "1" ){
				sstr = sstr +"</h2></div><div id=bcontent" + countfr   + " class=entry  > <input type=hidden id=colp" + countfr + " name=colp" + countfr + "  value = " + ncolpos + " ><table border=0 height='17' cellspacing=0 cellpadding= 0 width='95%' >"
			}
		}

		var newbtnw =0

		//alert(countfr + "hidhtmlv" + countfr);
		var hidhtmlv= window.document.getElementById("hidhtmlv" + countfr ).innerHTML;
		if ( hidhtmlv != "")
		{
		document.write("</td></tr><tr><td colspan=2 > " + hidhtmlv + "")

		}




//alert("hasnewskinxx " + sstr )
			var snewURL 
			if (nEntityValue  != "" )
			{
				snewURL = "display.asp?pageid=1&parententityid=" + nparentEntityId1  + "&parenttypeid=" + nparentTypeId1  + "&parentvalueid=" + nparentValueId1  + "&topicid=" + ntopicid + "&productid=" + nproductid +  "&entityid=" + nentityidfound  +  "&typeid=" + ntypeidfound + "&peid=" + peid  + "&ptid=" + ptid  + "&pvid=" + pvid
			} else
			{
				snewURL = "display.asp?pageid=" + pageid + "&parententityid=" + nParententityid + "&parenttypeid=" + nParentTypeid + "&parentvalueid=" + nParentValueid + "&topicid=" + ntopicid + "&productid=" + nproductid +  "&entityid=" + nentityidfound  +  "&typeid=" + ntypeidfound 
			
			}
			snewURL = snewURL + "&sctype=" + sctype;

		var newbtnw =0
		var sposthtml =""


			if ( nParententityid =='25' && nParentTypeid =='243' && paget=="" )
			{

			}
			else
                        {
				snewURL  = snewURL  + "&editaction=1&entityvalue=-11"
				sposthtml ="<b>[</b>&nbsp;<a  href = '" + snewURL  + "' target=_top><span class= Menubuttonc   onMouseout=\"hideddrivetip()\" onmouseover= \"ddrivetip('Create or Post a New entry', '100')\"  value ='" + captionnew + "' >"+ captionnew +"</span></a>&nbsp;<b>]</b>"

				if (nshowtext=="1")
				{

					snewurlval = "editentity.asp?closetypev=1&productid=" + nproductid + "&Topicid=" + ntopicid + "&timeoffset=0&pageid=1&entityid=" + nentityidval1 +"&Typeid=" + ssectionentitytype1 + "&parententityidvalue=" + nParententityid + "&parentTypeid="  + nParentTypeid + "&parentValueid="  + nParentValueid + "&editaction=1&empid=8&sectionid=82&fromframe=1&Sitenamevalue1zz=&timeoffsetv=300&sctype="+ sctype + "&keyword="+ keywordv;
					sposthtml ="<div id =showwin"+ ssectiontype11 + " name = showwin"+ ssectiontype11 + " ><input style='BORDER: #d1c7ac 1px solid; BACKGROUND-COLOR: #ffffc1' onfocus=\"fixedtooltipmaxwin1('showwin"+ ssectiontype11 + "','" + snewurlval  + "',  '700px', '450px');\" maxlength=50 size=40 name=textv77 value='" + ssectionentitycap+ "'/></div> "


				} 

			}

		
		if (scolumnnum != "5" && nosetting !="1"  )
		{

			if (newbtn=="1"){
			if (rsSectionListtype !="2") {
				//alert("dd" +":" + shownewtoeveryone +":" + isfriend )
				if (  (isteam =="1"  || editall=="True" || (npostnew =="1" && shownewtoeveryone =="1")  || (npostnew =="1" && isfriend == "1" ))) {
				    if (captionnew!=""){
					if (isteam =="1"){
						sstr = sstr + "<tr><td>&nbsp; "  + sposthtml  + "</td></tr>"
						 newbtnw =1;
					}

					if (isteam !="1"){
						sstr = sstr +"<tr><td>&nbsp;"  + sposthtml  + " </td></tr>"
						newbtnw =1;
					}
				    }
           			} 
			}
			}
			//alert("xxyyzzaabnewbtn" + newbtn + " nParententityid" + nParententityid + " nParentTypeid" + nParentTypeid + " paget" + paget)
			if (newbtn=="0"){
				//alert("1")
			   if ( nParententityid =='25' && nParentTypeid =='243' && paget=="" ) {
				//alert("11")
				var snewURLa =  "display.asp?pageid=" + pageid + "&parententityid=4&parenttypeid=18&parentvalueid=" + sEmpid + "&topicid=-1&productid=-1&entityid=" + nentityidfound  +  "&typeid=" + ntypeidfound + "&sctype=" + sctype + "&catid=" + nParentValueid + "&regid=" + ntopicid ; 
				//alert("112")
			     if (rsSectionListtype !="2" ){
				//if ( scontext=="" && (isteam =="1"  || editall=="True" || (npostnew =="1" && shownewtoeveryone =="1") ||  ( nParententityid =="25" && nParentTypeid =="243" && paget=="" )  || (npostnew =="1" && isfriend == "1" ))) {
				    if (captionnew!=""){
					if (isteam =="1"){
						sstr = sstr + "<tr><td>&nbsp;<span class=Menubuttonc onclick=\"javascript:window.location.href='" + snewURLa  + "&editaction=1&entityvalue=-11'\"  value = '" + captionnew + "'  alt='Create or Add new  ' >"  + captionnew + "</span></td></tr>"
					newbtnw =1;
					}

					if (isteam !="1"){
						sstr = sstr +"<tr><td>&nbsp;<span class=Menubuttonc onclick=\"javascript:window.location.href='" + snewURLa  + "&editaction=1&entityvalue=-11'\"  value = '" + captionnew + "'  alt='Create or Add new  ' >"  + captionnew + "</span></td></tr>"
					newbtnw =1;
					}

				    }
           			//} 
			      }
			    }
			}
		}


	if (hasnewskin =='True')
	{
		if (roundedcorner == "0" ) {
			sstr = sstr +" <tr> <td > <table  cellpadding=0 cellspacing=0 border=0 width='100%' bordercolor=" + Tablebordercolor + " bgcolor=white ><tr><td> " 
		}
		if (roundedcorner == "1" ) {
			sstr = sstr +" <tr> <td > <table  cellpadding=0 cellspacing=0 border=1 width='100%' bordercolor=" + Tablebordercolor + " bgcolor=white ><tr><td> " 
		}
		if (roundedcorner == "2" ) {
			sstr = sstr +"  <tr> <td > <table  cellpadding=0 cellspacing=0 border=0 width='100%'  > <tr><td> " 
		}
		


		
			if (rsSectionListtype !="2")
			{
				//alert("ileftsrc1 " + leftsrc1 + "inframeonly " + inframeonly)
				if (iseditentity == "0" || inframeonly== "1" ) {
					//alert("1")
					sstr = sstr +" <input type =hidden name = hidurl" + countfr   + " id = hidurl" + countfr   + " value ='" + leftsrc1  + "'> <div id = tp" + ssecentityvalue  + "  name = tp" + ssecentityvalue  + " > </div><div  name='leftframe" + countfr  + "_2' " + " id='leftframe" + countfr   + "_2'> </div> <div style='border-style:none' name='leftframe" + countfr   + "_1'  id='leftframe" + countfr  + "_1'>"

					//alert("ileftsrc1 " + leftsrc1)
					sstr = sstr +" <input type =hidden name = hidurlhasframe" + countfr   + " id =  hidurlhasframe" + countfr   + " value ='0'>"
					if (ns6){ 
 						sstr = sstr +"<IFRAME SRC=" + leftsrc1 + " name=leftframe"  + countfr   + " ID=leftframe" + countfr + "  width ='100%' HEIGHT=  " + shieght + "  frameborder=no  > </IFRAME>"
					} else{

 						sstr = sstr + "<IFRAME SRC=" + leftsrc1 + " name=leftframe"  + countfr   + " ID=leftframe" + countfr + " frameborder=no SCROLLING=auto  STYLE=' z-index:-1'  width =100% frameborder=no HEIGHT=  " + shieght  + "  ALLOWTRANSPARENCY=true  ></IFRAME>"


					}
				} else {
					//alert("2")
					sstr = sstr +"<input type =hidden name = hidurl" + countfr   + " id = hidurl" + countfr   + " value ='" + leftsrc1  + "'><div id = tp" + ssecentityvalue  + "  name = tp" + ssecentityvalue  + " > </div> <div  name='leftframe" + countfr   + "_2' " + " id='leftframe" + countfr   + "_2'> </div> <div style='border-style:none' height=" + shieght+  " name='leftframe" + countfr   + "_1'  id='leftframe" + countfr   + "_1'>"

					if (querytype=="0"){
						sstr = sstr +" <input type =hidden name = hidurlhasframe" + countfr   + " id =  hidurlhasframe" + countfr   + " value ='1'> <img src='" + simagepathconst + "/loading.gif' onmouseover=style.cursor = 'hand';  border=0 alt='Loading window' >"
					}

					if (querytype!="0" && firstsection== "1" ){
						sstr = sstr +" <input type =hidden name = hidurlhasframe" + countfr   + " id =  hidurlhasframe" + countfr   + " value ='" + querytype + "'> <img src='" + simagepathconst + "/loading.gif' onmouseover=style.cursor = 'hand';  border=0 alt='Loading window' >"

					}

					if (querytype!="0" && firstsection!= "1" ){
						sstr = sstr +" <input type =hidden name = hidurlhasframe" + countfr   + " id =  hidurlhasframe" + countfr   + " value ='0'> <img src='" + simagepathconst + "/loading.gif' onmouseover=style.cursor = 'hand';  border=0 alt='Loading window' >"

					}


				}
				
				

			}
	}
			
		if (hasnewskin !='True')
		{


			sstr = sstr +"</div></td></tr></table>"
			sstr = sstr +"</td></tr>"

		if (roundedcorner != "2" ) {
			sstr = sstr +"</table></div>"
		}
		if (roundedcorner == "2" ) {
	    		if(shoppara=="0"){	
				sstr = sstr +"</table></P></div><div id=bcontent" + countfr + "  class=roundedcornr_bottom_" + divskinval+ "><div></div></div></div></div>"

			}
	    		if(shoppara=="1"){	
				sstr = sstr +"</table></div><div id=bcontent" + countfr + " class=roundedcornr_bottom_" + divskinval+ "><div></div></div></div></div>"

			}

		}	

		}

		if (hasnewskin =='True')
		{
			sstr = sstr +"</td></tr></table></td></tr></table></P></div></div>"

	

		}
		//alert(sstr);
		document.write(sstr)
}
}






        function showsection(secid){
        //alert(secid)
        var displayval = document.getElementById(secid).style.display;
        var imgsrc = document.getElementById(secid + "img" ).src;
        //alert(" displayval  " + displayval  )
        if (displayval =="none"){
        document.getElementById(secid).style.display= "block";
        document.getElementById(secid + "img" ).src= "content/template/login/images/minus.gif";
        }
        if (displayval ==""){
        document.getElementById(secid).style.display= "none";
        document.getElementById(secid + "img" ).src= "content/template/login/images/plus.gif";
        }
        if (displayval =="block"){
        document.getElementById(secid).style.display= "none";
        document.getElementById(secid + "img" ).src= "content/template/login/images/plus.gif";
        }
        }


	function searchpage(parententityid,parenttypeid,parentvalueid){
	//alert("ddd")
	var toDay = new Date();  
	var timestamp = toDay.getTime();
        var searchk= document.getElementById("tb" ).value;
	//alert(searchk);
	document.getElementById("keywordv").value = searchk;

	var winsrc ="display.asp?pageid=1&topicid=-1&productid=-1&sctype=&showconfigscreen=4"  + "&parententityid=" + parententityid + "&parenttypeid=" + parenttypeid + "&parentvalueid=" + parentvalueid + "&searchk=" + searchk + "&Time=" + timestamp;
	//alert(winsrc);
	window.location.href = winsrc ;
	}

	function searchpage1(parententityid,parenttypeid,parentvalueid, topicid, productid , sctype){
	var toDay = new Date();  
	var timestamp = toDay.getTime();
        var searchk= escape(document.getElementById("tb").value);
	
	window.document.getElementById("keywordv").value = searchk;

	var winsrc ='display.asp?pageid=1&parententityid=' + parententityid + '&parenttypeid=' + parenttypeid + '&parentvalueid=' + parentvalueid + '&topicid=' + topicid + '&productid=' + productid + '&sctype=' + sctype + '&keyword=' + searchk + '&Time=' + timestamp;
	window.location.href = winsrc ;
	return;
	}




	function searchpage2(parententityid,parenttypeid,parentvalueid, topicid, productid , sctype){
	//alert("searchpage2")
	var toDay = new Date();  
	var timestamp = toDay.getTime();
        var searchk= window.document.getElementById("tb1").value;
	//alert(searchk);
	searchk= escape(searchk);
	document.getElementById("keywordv").value = searchk;

	var winsrc ='display.asp?pageid=1&parententityid=' + parententityid + '&parenttypeid=' + parenttypeid + '&parentvalueid=' + parentvalueid + '&topicid=' + topicid + '&productid=' + productid + '&sctype=' + sctype + '&keyword=' + searchk + '&Time=' + timestamp;
	//alert(winsrc );
	window.location.href = winsrc ;
	return;
	}


	function searchpage3(parententityid,parenttypeid,parentvalueid, topicid, productid , sctype, vals){
	//alert("searchpage2")
	var toDay = new Date();  
	var timestamp = toDay.getTime();
        var searchk= vals;
	//alert(searchk);
	searchk= escape(searchk);
	document.getElementById("keywordv").value = searchk;

	var winsrc ='display.asp?pageid=1&parententityid=' + parententityid + '&parenttypeid=' + parenttypeid + '&parentvalueid=' + parentvalueid + '&topicid=' + topicid + '&productid=' + productid + '&sctype=' + sctype + '&keyword=' + searchk + '&Time=' + timestamp;
	//alert(winsrc );
	window.location.href = winsrc ;
	return;
	}
       function showchatsection(secid){
        //alert(secid)
        var displayval = document.getElementById(secid).style.display;
        var imgsrc = document.getElementById(secid + "img" ).src;
        //alert(" displayval  " + displayval  )
        if (displayval =="none"){
        document.getElementById(secid).style.display= "block";
        document.getElementById(secid + "img" ).src= "content/template/login/images/minus.gif";
	 document.getElementById(secid).style.display= "block";
	var skinid = window.document.getElementById('skinId').value ;

	 document.getElementById(secid).innerHTML= "<iframe 'src=code/chat/ch2.asp?sctype=1&skinid=" + skinid   + "' frameborder=no SCROLLING=no  STYLE=' z-index:-1'  width =150 HEIGHT=  360  ALLOWTRANSPARENCY=true> </iframe>"

        }
        if (displayval ==""){
        document.getElementById(secid).style.display= "none";
        document.getElementById(secid + "img" ).src= "content/template/login/images/plus.gif";
	document.getElementById(secid).innerHTML= ""
        }
        if (displayval =="block"){
        document.getElementById(secid).style.display= "none";
        document.getElementById(secid + "img" ).src= "content/template/login/images/plus.gif";
	document.getElementById(secid).innerHTML= ""
        }
        }

function Opennews(url){
	//alert('teste1')
	var toDay = new Date();  
	var timestamp = toDay.getTime();
	//EmpPopupWindow = window.open("code/admintools/Multipleuser.asp?Type=1&" + "TextBox=" + TextBox + "&Entityid=" + Entityid + "&typeid=" + Entitytype + "&Entityvalue=" + Entityvalue + "&roleid=" + roleid + "&Time=" + timestamp, "EmployeeLookup", "scrollbars=1,resizable=1,width=600,height=500");
	RSSPopupWindow = window.open(url , "Newspopup", "scrollbars=1,resizable=1,width=800,height=600");

}


function showdivtext(span){
	//alert(span)
	document.getElementById(span).style.display= "inline";  
	document.getElementById("im" + span).style.display= "none";  

}
function OpenEmployee(TextBox,Entityid,Entityvalue, Entitytype, roleid){
	var toDay = new Date();  
	var timestamp = toDay.getTime();
	EmpPopupWindow = window.open("code/admintools/SearchEmployees.asp?Type=1&" + "TextBox=" + TextBox + "&Entityid=" + Entityid + "&typeid=" + Entitytype + "&Entityvalue=" + Entityvalue + "&roleid=" + roleid + "&Time=" + timestamp, "EmployeeLookup", "scrollbars=1,resizable=1,width=500,height=500");

}

function OpenOrg(TextBox,Entityid,Entityvalue, Entitytype, roleid){
	alert('nnnn')
	var toDay = new Date();  
	var timestamp = toDay.getTime();
	EmpPopupWindow = window.open("orglookup.asp?Type=1&" + "TextBox=" + TextBox + "&Entityid=" + Entityid + "&typeid=" + Entitytype + "&Entityvalue=" + Entityvalue + "&roleid=" + roleid + "&Time=" + timestamp, "EmployeeLookup", "scrollbars=1,resizable=1,width=500,height=500");

}

function OpenEmployee1(TextBox,Entityid,Entityvalue, Entitytype, roleid){
	//alert('teste1')
	var toDay = new Date();  
	var timestamp = toDay.getTime();
	//EmpPopupWindow = window.open("code/admintools/Multipleuser.asp?Type=1&" + "TextBox=" + TextBox + "&Entityid=" + Entityid + "&typeid=" + Entitytype + "&Entityvalue=" + Entityvalue + "&roleid=" + roleid + "&Time=" + timestamp, "EmployeeLookup", "scrollbars=1,resizable=1,width=600,height=500");
	EmpPopupWindow = window.open("code/admintools/Multipleuser1.asp?Type=1&" + "TextBox=" + TextBox + "&Entityid=" + Entityid + "&typeid=" + Entitytype + "&Entityvalue=" + Entityvalue + "&roleid=" + roleid + "&Time=" + timestamp, "EmployeeLookup", "scrollbars=1,resizable=0,width=600,height=500");

}

function OpenEmployeeLookup(TextBox,Entityid,Entityvalue, Entitytype, roleid){
	var toDay = new Date();  
	var timestamp = toDay.getTime(); 
	EmpPopupWindow = window.open("code/admintools/SearchEmployees.asp?Type=2&" + "TextBox=" + TextBox + "&Entityid=" + Entityid + "&typeid=" + Entitytype + "&Entityvalue=" + Entityvalue + "&roleid=" + roleid + "&Time=" + timestamp, "EmployeeLookup", "scrollbars=1,resizable=1,width=500,height=500");
}

function drawport(leftsrc21 , countfr  , type1){
var d = new Date();
var dval = d.getTimezoneOffset();
document.write("<IFRAME SRC='" + leftsrc21 + "&timeoffsetv=" + dval  + "' name=leftframe"  + countfr   + " ID=leftframe" + countfr + "  width ='100%' HEIGHT=  1800 frameborder=no  > </IFRAME>")

}

function drawportfr(leftsrc21 ){

var d = new Date();
var dval = d.getTimezoneOffset();
document.write("<IFRAME SRC='" + leftsrc21 + "&timeoffsetv=" + dval  + "' name=leftframe443 ID=leftframe443  width ='100%' frameborder=no SCROLLING=auto  STYLE=' z-index:-1'  width =100% HEIGHT=  1000  ALLOWTRANSPARENCY=true  > </IFRAME>")

}

function hidesec(){
//alert('hidesec')
var skinid = window.document.getElementById('hidsec').innerText ;
//alert (':' + escape(skinid) + ':')
if (skinid =='  Hide ' || skinid ==' Hide '){

document.getElementById('welcomesec').style.display= 'none';
document.getElementById('welcomesec1').style.display= 'block'
window.document.getElementById('hidsec').innerText= ' Show ';
}
if (skinid =='Show ' || skinid ==' Show '){

document.getElementById('welcomesec').style.display= 'block';
document.getElementById('welcomesec1').style.display= 'none'
window.document.getElementById('hidsec').innerText= ' Hide ';
} 

}



function startchatting(){
	var toDay = new Date();  
	var timestamp = toDay.getTime();
	var skinid = window.document.getElementById('skinId').value ;
	EmpPopupWindow = window.open("code/chat/ch2.asp?Time=" + timestamp + "&skinid=" + skinid   , "chat"  , "scrollbars=0,resizable=0,width=300,height=500");

}


function OpenEmployeeLookup1(TextBox,Entityid,Entityvalue, Entitytype, roleid){
	var toDay = new Date();  
	var timestamp = toDay.getTime(); 
	EmpPopupWindow = window.open("code/admintools/Multipleuser.asp?Type=2&" + "TextBox=" + TextBox + "&Entityid=" + Entityid + "&typeid=" + Entitytype + "&Entityvalue=" + Entityvalue + "&roleid=" + roleid + "&Time=" + timestamp, "EmployeeLookup", "scrollbars=1,resizable=0,width=600,height=500");
}




function drawportlet1(j  )
{




var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6){
	
	//document.write("  xxxxxxaa " + j + "yyyy")
}

}

function CloseFrame1(frameCounter, secid)
{

	//alert("close1 :" + secid);
	//var answer = confirm("Do you want to remove this Section? You can add a section back later.")

	document.getElementById('outframe' +secid).style.display='none';
	saveuserstate(secid, 2);

}


function CloseFrame(frameCounter, secid)
{
	//alert("0" + secid);
	var answer = confirm("Do you want to remove this Section? You can add a section back later using the page configuration.")
	if (answer){
	}
	else{
		return;
	}
	//alert("closeframe" + frameCounter)
	//alert("closeframe" + secid)
	//document.getElementById('portletframe' + frameCounter).style.display='none';
	//document.getElementById('outframe' +secid).style.display='none';
	saveuserstate(secid, 2);

}

var anWindow = null;
function OpenWindow (mailURL, WinName, WinAttribute)
{
	var URL = mailURL;
	if ((anWindow != null) && (anWindow.closed != true)) {
		anWindow.document.location = URL;
		anWindow.focus ();
	}
	else {
		anWindow = window.open (URL, WinName, WinAttribute);
	}
}


function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, tipwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (tipwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=tipwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset = (whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1

if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}


function fixedtooltipdiv1( tipwidth, tiphieght){

var toDay = new Date(); 
//alert("test")
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv

var jc;
var jce = document.getElementById("jc");
if (jce != null)
{
 jc = document.getElementById("jc").innerHTML;
}
var jy;
var jye = document.getElementById("jy");
if (jye != null)
{
 jy = document.getElementById("jy").innerHTML;
}
var jf1;
var jf1e = document.getElementById("jf1");
if (jf1e != null)
{
 jf1 = document.getElementById("jf1").innerHTML;
}

var nd;
var nde = document.getElementById("nd");
if (nde != null)
{
 nd = document.getElementById("nd").innerHTML;
}

var nd1;
var nde1 = document.getElementById("newdatelogin");
if (nde1 != null)
{
 nd1 = document.getElementById("newdatelogin").value;
}


var showalert1;
var showalert;
var showalert1 = document.getElementById("showalert");
if (showalert1 != null)
{
 showalert= document.getElementById("showalert").value;
}
///shwalert
//alert("111");
var shwalert = "";
var shwalert1 = document.getElementById("shwalert");
if (shwalert1 != null)
{
 shwalert = document.getElementById("shwalert").value;
}


//alert(   nd1 + ":" + showalert   )
// show the pending request screen for users 

if (shwalert== '0'){

if ((nd1=="1") || (showalert =="1" )){
//alert( jc + ":" + jy  + ":" + jf1 + ":")
if (jc !='' || jy !=''  || (jf1 !='' && jf1!=' ')) 
{
if (jc !=undefined || jy !=undefined  || jf1 !=undefined) {
document.cookie ="newdatelogin1" + "=0;" ;
var jm= jc + "<br>" + jy  + "<br>" + jf1 + "<br><br><br><br><br><br>";
dropmenuobj.innerHTML="<table border=0 width=100% cellspacing=3 cellpadding=2 bgcolor =#ffffff><tr bgcolor =#ffffff height=20 ><td align= center><font color=royalblue size=2> <b>Alerts / Site messages </b></font> </td> <td align=right>&nbsp;  <a href ='javascript:delayhidetip()' onclick ='javascript:delayhidetip()'> <img src ='content/template/template1/images/redclose.bmp' alt = ' Close Window' border=0 width =16 hieght=16> </a> </td></tr><tr> <td ><br>" + jm + " </td></tr></table>"
dropmenuobj.style.visibility ="visible";
dropmenuobj.style.left ="200px" ;
dropmenuobj.style.top ="200px" ;
dropmenuobj.style.width = tipwidth + "px";
dropmenuobj.style.hieght =  tiphieght + "px" ;
}
}
}}
}





function fixedtooltipshowwin(url, tipwidth, tiphieght){

var toDay = new Date(); 
//alert("test")
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
var jm = "<IFRAME SRC='" + url + "&Time=" + toDay.getTime() + "' name=left12frame1 ID=left12frame1 frameborder=no SCROLLING=auto  width =100% HEIGHT=  " + tiphieght + "    ></IFRAME>"

dropmenuobj.innerHTML="<table border=0 width=100% cellspacing=3 cellpadding=2 bgcolor =#ffffff><tr  height=20 bgcolor =#ffffff><td colspan=2 align=right>&nbsp;  <a href ='javascript:delayhidetip()' onclick ='javascript:delayhidetip()'> <img src ='content/template/template1/images/redclose.bmp' alt = ' Close Window' border=0 width =16 hieght=16> </a> </td></tr><tr> <td colspan=2>" + jm + " </td></tr></table>"
dropmenuobj.style.visibility ="visible";

var scrollposy =getScrollY();
var scrollposx =getScrollX();
//alert(" scrollposy " + scrollposy  + " scrollposx " + scrollposx )

scrollposy   = scrollposy   + 100;
scrollposx =100;

dropmenuobj.style.left ="100px" ;
dropmenuobj.style.top =scrollposy    + "px" ;
dropmenuobj.style.width =  "700px";
dropmenuobj.style.hieght =  tiphieght + "px" ;


}




function fixedtooltipmaxwin(url, tipwidth, tiphieght){

var toDay = new Date(); 

var scrollheight = geth();
var scrollwidth =getw();
if (ie4){

tipwidth= scrollwidth - 20;
}
tiphieght = scrollheight - 60 ;

if (tipwidth > 900 ){
tipwidth=850;
}
if (tipwidth < 600 ){
tipwidth=800;
}


if (ie4){
var scrollposy =getScrollY();
var scrollposx =getScrollX();
scrollposy = scrollposy +10;
scrollposx = scrollposx +10;

var scrollheight = geth();
var scrollwidth =getw();
tipwidth = scrollwidth - 20;
tiphieght = scrollheight - 60 ;
}

dropmenuobj = document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
var jm = "<IFRAME SRC='" + url + "&Time=" + toDay.getTime() + "' name=left12frame1 ID=left12frame1 frameborder=no SCROLLING=auto  width =100% HEIGHT=  " + tiphieght + "    ></IFRAME>"

dropmenuobj.innerHTML="<table border=0 width=100% cellspacing=3 cellpadding=2 bgcolor =#ffffff><tr bgcolor =#ffffff height=20 ><td align=right colspan=2>&nbsp;  <a href ='javascript:delayhidetip()' onclick ='javascript:delayhidetip()'> <img src ='content/template/template1/images/redclose.bmp' alt = ' Close Window' border=0 width =16 hieght=16> </a> </td></tr><tr> <td colspan=2 >" + jm + " </td></tr></table>"
dropmenuobj.style.visibility ="visible";
dropmenuobj.style.left ="20px" ;
dropmenuobj.style.top ="20px" ;
//
if (ie4){
dropmenuobj.style.width =   tipwidth + "px" ;
}
if (!ie4){
dropmenuobj.style.width =   "700px";
//alert( " xxtipwidth  " + tipwidth   + " tiphieghtx " + dropmenuobj.style.width );
}

dropmenuobj.style.hieght =  tiphieght + "px" ;

//alert( " cctipwidth  " + tipwidth   + " tiphieghtx " + dropmenuobj.style.width );

}


function fixedtooltipmaxwin1(menudiv , url, tipwidth, tiphieght){

var toDay = new Date(); 

//alert(menudiv);

dropmenuobj = document.getElementById? document.getElementById(menudiv) : fixedtipdiv
var jm = "<IFRAME SRC='" + url + "&Time=" + toDay.getTime() + "' name=left12frame1 ID=left12frame1 frameborder=no SCROLLING=auto  width =100% HEIGHT=  " + tiphieght + "    ></IFRAME>"

dropmenuobj.innerHTML="<table border=0 width=100% cellspacing=3 cellpadding=0 bgcolor =#ffffff><tr> <td  >" + jm + " </td></tr></table>"
dropmenuobj.style.visibility ="visible";

}


function fixedtooltipdiv(menudiv, obj, e, tipwidth, tiphieght){
	var toDay = new Date(); //+ "&Time=" + toDay.getTime()
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidetip()
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
dropmenuobj.innerHTML=document.getElementById(menudiv).innerHTML

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
if (dropmenuobj.x-clearbrowseredge(obj, "rightedge") <=0){
	//alert('here')
	dropmenuobj.style.left="0px";
	//alert(dropmenuobj.style.left)
}
//alert ( "dropmenuobj.y " + dropmenuobj.y +  " obj.offsetHeight " + obj.offsetHeight)
dropmenuobj.style.top=dropmenuobj.y+obj.offsetHeight+"px"
//dropmenuobj.style.top="100px"
//dropmenuobj.style.top= tiphieght;

}
}


function fixedtooltiptext(menucontents, obj, e, tipwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidetip()
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
dropmenuobj.innerHTML=menucontents

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
}



function fixedtooltipwin1(menucontents, obj, e, tipwidth, tiphieght){
	var toDay = new Date(); //+ "&Time=" + toDay.getTime()
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidetip()
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
dropmenuobj.innerHTML="<table border=0 width=100% cellspacing=3 cellpadding=2><tr bgcolor =#ffffff><td colspan=2 align=right>&nbsp;  <a href ='javascript:delayhidetip()' onclick ='javascript:delayhidetip()'> <img src ='content/template/template2/images/rem.gif' alt = ' Close' border=0 > </a> </td></tr><tr> <td colspan=2><IFRAME SRC='" + menucontents + "&Time=" + toDay.getTime() + "' name=left12frame1 ID=left12frame1 frameborder=no SCROLLING=auto  width =100% HEIGHT=  " + tiphieght + "    ></IFRAME> </td></tr></table>"

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
}


function getScrollY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
	//alert("sdd" + scrOfY )
  return  scrOfY;
}

function fixedtooltip(menucontents, obj, e, tipwidth, tiphieght){
	var toDay = new Date(); //+ "&Time=" + toDay.getTime()
	var x =parseInt(tipwidth)
	var y =parseInt(tiphieght)
	var menuf = menucontents+ "&Time=" + toDay.getTime() ;
	//alert(menuf);
	$.showAkModal(menuf ,' &nbsp;&nbsp;',x,y);

}

function fixedtooltipc(menucontents, caption, tipwidth, tiphieght){
	var toDay = new Date(); //+ "&Time=" + toDay.getTime()
	var x =parseInt(tipwidth)
	var y =parseInt(tiphieght)
	var menuf = menucontents+ "&Time=" + toDay.getTime() ;
	//alert(menuf);
	$.showAkModal(menuf ,caption,x,y);

}


function fixedtooltipv(menucontents, obj, e, tipwidth, tiphieght){
	var toDay = new Date(); //+ "&Time=" + toDay.getTime()
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidetip()
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
dropmenuobj.innerHTML="<table border=0 width=100% cellspacing=3 cellpadding=0><tr><td align= left> <a href ='javascript:delayhidetip()' onclick ='javascript:delayhidetip()'><img src ='content/template/template1/images/redclose.bmp' alt = ' Close Window' border=0 width =16 hieght=16>&nbsp;<font color =#ffffff><b>Close </b></a> </td> <td align=right>&nbsp;  <a href ='javascript:delayhidetip()' onclick ='javascript:delayhidetip()'> <img src ='content/template/template1/images/redclose.bmp' alt = ' Close Window' border=0 width =16 hieght=16> </a> </td></tr><tr> <td colspan=2><IFRAME SRC='" + menucontents + "&Time=" + toDay.getTime() + "' name=left12frame1 ID=left12frame1 frameborder=no SCROLLING=auto  width =100% HEIGHT=  " + tiphieght + "    ></IFRAME> </td></tr></table>"

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
if (dropmenuobj.x-clearbrowseredge(obj, "rightedge") <=0){
	//alert('here')
	dropmenuobj.style.left="0px";
	//alert(dropmenuobj.style.left)
}
var scrollposy =getScrollY();
scrollposy = scrollposy +100
//alert ( " cc dropmenuobj.y " + dropmenuobj.y +  " obj.offsetHeight " + obj.offsetHeight +  " obj.scrollTop " + scrollposy )
dropmenuobj.style.top=scrollposy +"px"

//dropmenuobj.style.top="100px"
//dropmenuobj.style.top= tiphieght;

}
}

function fixedtooltipimg(menucontents, obj, e, tipwidth, tiphieght){
alert("fixedtooltipimg");
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidetip()
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
dropmenuobj.innerHTML="<table border=0 width=100% cellspacing=3 cellpadding=0><tr><td align= left> <a href ='javascript:delayhidetip()' onclick ='javascript:delayhidetip()'><img src ='content/template/template1/images/redclose.bmp' alt = ' Close Window' border=0 width =16 hieght=16>&nbsp;<font color =#ffffff><b>Close </b></a> </td> <td align=right>&nbsp;  <a href ='javascript:delayhidetip()' onclick ='javascript:delayhidetip()'> <img src ='content/template/template1/images/redclose.bmp' alt = ' Close Window' border=0 width =16 hieght=16> </a> </td></tr><tr> <td colspan=2><img SRC='" + menucontents + "' name=left12frame1 ID=left12frame1 border=0> </td></tr></table>"

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
if (dropmenuobj.x-clearbrowseredge(obj, "rightedge") <=0){
	dropmenuobj.style.left="0px";
}
var scrollposy =getScrollY();
scrollposy = scrollposy +100
//alert ( " cc dropmenuobj.y " + dropmenuobj.y +  " obj.offsetHeight " + obj.offsetHeight +  " obj.scrollTop " + scrollposy )
dropmenuobj.style.top=scrollposy +"px"

//dropmenuobj.style.top="100px"
//dropmenuobj.style.top= tiphieght;

}
}

function hidetip(e){

if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
{
dropmenuobj.style.visibility="hidden";
dropmenuobj.style.innerHTML="";
}
}
}

function delayhidetip(){
if (ie4||ns6)
delayhide=setTimeout("hidetip()",disappeardelay)
}

function delayhidealert(){
var dropmenuobj1=document.getElementById? document.getElementById("sectional") : sectional ;

if (ie4||ns6)
{
dropmenuobj1.style.visibility="hidden";
}

}


function clearhidetip(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}



function hidetipr(e){

if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
{
//dropmenuobj.style.visibility="hidden";
//dropmenuobj.style.innerHTML="";
//alert("reload")
window.location.reload(true);
}
}
}

function delayhidetipr(){
if (ie4||ns6)
delayhider=setTimeout("hidetipr()",disappeardelay)
}

function clearhidetipr(){
if (typeof delayhider!="undefined")
clearTimeout(delayhider)
}



function getScrollHeight()
{
   var h = document.body.scrollHeight ||
           document.documentElement.scrollHeight;
           
   return h ? h : 0;
}


function getScrollWidth()
{
   var h = document.body.scrollWidth ||
           document.documentElement.scrollWidth;
           
   return h ? h : 0;
}


function getScrollY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
	//alert("sdd" + scrOfY )
  return  scrOfY;
}

function getScrollX() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
	//alert("sdd" + scrOfY )
  return  scrOfX;
}

function getw() {
  
   var viewportwidth;
 var viewportheight;
 
 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
 
 if (typeof window.innerWidth != 'undefined')
 {
      viewportwidth = window.innerWidth,
      viewportheight = window.innerHeight
 }
 
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

 else if (typeof document.documentElement != 'undefined'
     && typeof document.documentElement.clientWidth !=
     'undefined' && document.documentElement.clientWidth != 0)
 {
       viewportwidth = document.documentElement.clientWidth,
       viewportheight = document.documentElement.clientHeight
 }
 
 // older versions of IE
 
 else
 {
       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
       viewportheight = document.getElementsByTagName('body')[0].clientHeight
 }

	return viewportwidth ;
}


function geth() {
  
   var viewportwidth;
 var viewportheight;
 
 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
 
 if (typeof window.innerWidth != 'undefined')
 {
      viewportwidth = window.innerWidth,
      viewportheight = window.innerHeight
 }
 
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

 else if (typeof document.documentElement != 'undefined'
     && typeof document.documentElement.clientWidth !=
     'undefined' && document.documentElement.clientWidth != 0)
 {
       viewportwidth = document.documentElement.clientWidth,
       viewportheight = document.documentElement.clientHeight
 }
 
 // older versions of IE
 
 else
 {
       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
       viewportheight = document.getElementsByTagName('body')[0].clientHeight
 }

	return viewportheight ;
}






function fixedtooltipmax(menucontents, obj, e, tipwidth, tiphieght){
var toDay = new Date(); //+ "&Time=" + toDay.getTime()

//var scrollposy =getScrollY();
//var scrollposx =getScrollX();
//scrollposy = scrollposy +10;
//scrollposx = scrollposx +10;

var scrollheight = geth();
var scrollwidth =getw();
if (ie4){

tipwidth= scrollwidth - 20;
}
tiphieght = scrollheight - 60 ;

if (tipwidth > 900 ){
tipwidth=850;
}


if (ie4){
var scrollposy =getScrollY();
var scrollposx =getScrollX();
scrollposy = scrollposy +10;
scrollposx = scrollposx +10;

var scrollheight = geth();
var scrollwidth =getw();
tipwidth= scrollwidth - 20;
tiphieght = scrollheight - 60 ;
}



if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidetip()
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
dropmenuobj.innerHTML="<table border=0 width=100% cellspacing=4 cellpadding=0><tr><td align= left> <a href ='javascript:delayhidetip()' onclick ='javascript:delayhidetip()'><img src ='content/template/template1/images/redclose.bmp' alt = ' Close Window' border=0 width =16 hieght=16> &nbsp;<font color =#ffffff><b>Close </b></a> </td> <td align=right>&nbsp;  <a href ='javascript:delayhidetip()' onclick ='javascript:delayhidetip()'> <img src ='content/template/template1/images/redclose.bmp' alt = ' Close Window' border=0 width =16 hieght=16> </a> </td></tr><tr> <td colspan=2><IFRAME SRC='" + menucontents + "&Time=" + toDay.getTime() + "' name=left12frame1 ID=left12frame1 frameborder=no SCROLLING=auto  width =100% HEIGHT=  " + tiphieght + "    ></IFRAME> </td></tr></table>"

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
if (dropmenuobj.x-clearbrowseredge(obj, "rightedge") <=0){
	//alert('here')
	dropmenuobj.style.left="0px";
	//alert(dropmenuobj.style.left)
}
var scrollposy =getScrollY();
scrollposy = scrollposy +20
//alert ( " cc dropmenuobj.y " + dropmenuobj.y +  " obj.offsetHeight " + obj.offsetHeight +  " obj.scrollTop " + scrollposy )
dropmenuobj.style.top=scrollposy +"px"

//dropmenuobj.style.top="20px"
//dropmenuobj.style.top= tiphieght;

}
}


function MinPort(secid)
{

var emparr=document.getElementById("emparr").value;

	if (secid!="")
	{	
		//alert("ID: " + secid);
		//alert("here");
		//MinMaxWin(secid, "leftframe" + secid + "_1", 3, 0, 1);
		if (emparr=="")
			{emparr=emparr+secid;}
		else
			{emparr=emparr+","+secid;}
	}


document.getElementById("emparr").value=emparr;

return;
}

function callback() 
{	
   if(xmlHttp.readyState == 4) {
     // alert("call" & xmlHttp.status);
      if(xmlHttp.status == 200) {
		//alert("success");
		//alert(xmlHttp.responseText);
      }
      if(xmlHttp.status != 200) {
		//alert("success");
		//alert("requestb failed " + xmlHttp.responseText);
      }
   }
  
}

function callback22() 
{	
   if(xmlHttp.readyState == 4) {
      //alert("call" & xmlHttp.status);
      if(xmlHttp.status == 200) {
		var framenum = document.getElementById("curprocessframe").value;
		var Messagetoshow = document.getElementById("curprocessmessage").value;

		alert(Messagetoshow);
		//alert(nIndexval)
		
		//var substrval = returstr.substr(4, nIndexval-4);
		//var objOpener = window.opener;
		
		var t=setTimeout("Loadsingleframe()",20)

      }

      if(xmlHttp.status != 200) {

		alert('Problem in Loading:' + xmlHttp.status + ' response:' + xmlHttp.responseText )
				
	}
   }
  
}


function LoadExtpage(URL,Messagetoshow, framenumber)
{
//alert("exet url" + framenumber)
//alert(URL)

document.getElementById("curprocessframe").value= framenumber;
document.getElementById("curprocessmessage").value= Messagetoshow;

if( window.XMLHttpRequest )	//FF,NS,OP,IE7
{
	xmlHttp = new XMLHttpRequest();
}
else if( window.ActiveXObject )	//IE5 & 6
{
	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
 xmlHttp.open("GET",URL ,false);
xmlHttp.onreadystatechange = callback22;
xmlHttp.send(null); 


}

function callback222() 
{	
   if(xmlHttp.readyState == 4) {
      //alert("call" & xmlHttp.status);
      if(xmlHttp.status == 200) {
		var framenum = document.getElementById("curprocessframe").value;
		var Messagetoshow = document.getElementById("curprocessmessage").value;
		//alert("framenum " + framenum )
		var theURL = window.document.getElementById('hidurl' + framenum).value;
		//var thehelptext=  window.document.getElementById('hidtextv' + framenum).value;
		//var theURL1 = window.document.getElementById('hidurlhasframe' + framenum).value;
		var divval = 'leftframe' + framenum + '_1'
		var toDay = new Date();
		theURL = theURL + "&Time=" + toDay.getTime()
		//alert(divval + "  :  " + thehelptext)
		alert(Messagetoshow);	
		//fAJAXRequest( divval , theURL  , Messagetoshow , "Getting Data..." , "Request Failed");
		fAJAXRequest( divval , theURL  , ""  , "Getting Data..." , "Request Failed");
		//alert(nIndexval)
		
		//var substrval = returstr.substr(4, nIndexval-4);
		//var objOpener = window.opener;
		//window.location.reload(true);
		//var t=setTimeout("Loadsingleframe()",20)

      }

      if(xmlHttp.status != 200) {

		alert('Problem in Loading:' + xmlHttp.status + ' URL:' + xmlHttp.URL )
				
	}
   }
  
}

function callback223() 
{	
   if(xmlHttp.readyState == 4) {
      //alert("call" & xmlHttp.status);
      if(xmlHttp.status == 200) {
		window.location.reload(true);	
		var framenum= document.getElementById("curprocessframe").value;
		//alert(' framenumber' +  framenum)

		var theURL = window.document.getElementById('hidurl' + framenum).value;
		var divval = 'leftframe' + framenum + '_1'
		//alert('URL value ' + framenum + ":" + theURL);
		fAJAXRequest( divval , theURL  , "" , "Getting Data..." , "Request Failed");

      }

      if(xmlHttp.status != 200) {

		alert('Problem in Loading:' + xmlHttp.status + ' URL:' + xmlHttp.URL )
				
	}
   }
  
}


function LoadExtpage2(type, URL,Messagetoshow, framenumber)
{
//alert("exet url11" + framenumber + URL)
if (type ==1){
	var answer = confirm("Do you want to Delete this item.?")
	if (answer){

	}
	else{
		return;
	}


}
//alert(' framenumber' +  framenumber)
document.getElementById("curprocessframe").value= framenumber;
document.getElementById("curprocessmessage").value= Messagetoshow;


if( window.XMLHttpRequest )	//FF,NS,OP,IE7
{
	xmlHttp = new XMLHttpRequest();
}
else if( window.ActiveXObject )	//IE5 & 6
{
	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}

	xmlHttp.open("GET",URL ,false);
	xmlHttp.onreadystatechange = callback223;
	xmlHttp.send(null); 

if( window.XMLHttpRequest ) {
	window.location.reload(true);
}

}





function callback2237() 
{	
   if(xmlHttp.readyState == 4) {
      alert("The deletion has been done successfully.");
      //window.back();
	var cururl =document.getElementById("curprocessmessage").value ;
 	alert(cururl);
        window.location.href= cururl;
   }
  
}


function LoadExtpage27(type, URL,Messagetoshow, framenumber, cururl)
{
//alert("exet url11" + framenumber + URL)
if (type ==1){
	var answer = confirm("Do you want to Delete this item.?")
	if (answer){

	}
	else{
		return;
	}


}
//alert(' framenumber' +  framenumber)
document.getElementById("curprocessframe").value= framenumber;
document.getElementById("curprocessmessage").value= cururl;


if( window.XMLHttpRequest )	//FF,NS,OP,IE7
{
	xmlHttp = new XMLHttpRequest();
}
else if( window.ActiveXObject )	//IE5 & 6
{
	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlHttp.open("GET",URL ,false);
xmlHttp.send(null); 
//alert(cururl)
 window.location.href= cururl;


}

function Joinsite(empid , functionid, entityid, valueid, typeid, msgshow){

if (empid =="0")
{

window.location.href="login/default.asp?redir=3";
}

if (empid !="0")
{
var sURL = "editentity.asp?noHTML=1&editaction=13&pageid=1&entityid=" + entityid + "&typeid=" + typeid + "&entityvalue=" + valueid + "&parententityidvalue=" + entityid + "&parentTypeid=" + typeid + "&parentValueid=" + valueid + "&topicid=-1&productid=-1&functyp=" + functionid;
//alert(sURL)
LoadExtpage1(sURL,  msgshow);
window.location.reload(true);
}



}


function Join(functionid, entityid, valueid, typeid, msgshow){

var sURL = "editentity.asp?noHTML=1&editaction=13&pageid=1&entityid=" + entityid + "&typeid=" + typeid + "&entityvalue=" + valueid + "&parententityidvalue=" + entityid + "&parentTypeid=" + typeid + "&parentValueid=" + valueid + "&topicid=-1&productid=-1&functyp=" + functionid;
//alert(sURL)
LoadExtpage1(sURL,  msgshow);
window.location.reload(true);

}




function callback123() 
{	
   if(xmlHttp.readyState == 4) {
    // alert("call" & xmlHttp.responseText );
      if(xmlHttp.status == 200) {
		//alert("callzz " & xmlHttp.responseText );
		//var framenum = document.getElementById("curprocessframe").value;
		var Messagetoshow = document.getElementById("curprocessmessage").value;
		alert(Messagetoshow);
      }

      if(xmlHttp.status != 200) {

		alert('Problem in Loading:' + xmlHttp.status + ' URL:' + xmlHttp.URL )
				
	}
   }
  
}


function LoadExtpage1(URL,Messagetoshow)
{

//alert("LoadExtpage1")
document.getElementById("curprocessmessage").value= Messagetoshow;

if( window.XMLHttpRequest )	//FF,NS,OP,IE7
{
	xmlHttp = new XMLHttpRequest();
}
else if( window.ActiveXObject )	//IE5 & 6
{
	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
 
//alert(URL)
xmlHttp.open("GET",URL ,false);
xmlHttp.onreadystatechange = callback123;
xmlHttp.send(null); 


}



function callback() 
{	
   if(xmlHttp.readyState == 4) {
      //alert("call" & xmlHttp.status);
      if(xmlHttp.status == 200) {
		//alert("success");
		//alert(xmlHttp.responseText);
      }
   }
  
}

function callback1() 
{	
   if(xmlHttp.readyState == 4) {
      //alert("call" & xmlHttp.status);
      if(xmlHttp.status == 200) {
		
		//alert(xmlHttp.responseText);
		var returstr= xmlHttp.responseText;
		var nIndexval= returstr.indexOf(' ', 4);
		//alert(nIndexval)
		
		var substrval = returstr.substr(4, nIndexval-4);
		//alert(substrval);


		var theDiv = window.document.getElementById('leftframe' + substrval + '_1' );
		//alert(theDiv.hieght);
		theDiv.innerHTML= xmlHttp.responseText;
		
		//theDiv.hieght= 200;
		//alert(theDiv.hieght);
		theDiv.style.display='block';


      }
   }
  
}

function RefreshRSS()
{
//alert("refeshrss 3" )

if( window.XMLHttpRequest )	//FF,NS,OP,IE7
{
	xmlHttp = new XMLHttpRequest();
}
else if( window.ActiveXObject )	//IE5 & 6
{
	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
var toDay = new Date(); 
var URL = "editentity.asp?closetypev=1&productid=-1&Topicid=-1&timeoffset=0&pageid=1&entityid=5&Typeid=141&parententityidvalue=4&parentTypeid=18&parentValueid=8&editaction=1&empid=8&sectionid=82&fromframe=1&Sitenamevalue1zz=&timeoffsetv=300&Time=1257792204326"
var URL = "testrss.asp?" + "Time=" + toDay.getTime()
//alert(URL)
xmlHttp.open("GET",URL ,true);
//xmlHttp.onreadystatechange = callbackrss;

xmlHttp.send(null); 


}

function callbackrss() 
{	
   if(xmlHttp.readyState == 4) {
   //   alert("call" & xmlHttp.status);
      if(xmlHttp.status == 200) {
		
		//alert(xmlHttp.responseText);
		var returstr= xmlHttp.responseText;



      }
   }
  
}




function Loadpage()
{
//alert("loadpage")
var numframes = document.getElementById("totframecount").value;
//alert(numframes);
if (numframes > 8){
	numtotal=8 ;

}
if (numframes < 9){
	numtotal =numframes ;

}

//alert(numtotal);

for (var i=0; i <= numtotal; i++)
{
var theIFra2 = window.document.getElementById('leftframe' + i);
var theURL = window.document.getElementById('hidurl' + i).value;
var theURL1 = window.document.getElementById('hidurlhasframe' + i).value;

if (theURL1 =='1') {
//alert(theURL)
if( window.XMLHttpRequest )	//FF,NS,OP,IE7
{
	xmlHttp = new XMLHttpRequest();
}
else if( window.ActiveXObject )	//IE5 & 6
{
	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
 xmlHttp.open("GET", theURL ,false);
xmlHttp.onreadystatechange = callback1;
xmlHttp.send(null); 
}
}

if (numframes > 8){
	
	var t=setTimeout("Loadpage11()",20)

}



}


function Loadpage11()
{
alert("loadpage11")
var numframes = document.getElementById("totframecount").value;
//alert(numframes);



for (var i=0; i <= numframes ; i++)
{
alert(i);
var theIFra2 = window.document.getElementById('leftframe' + i);
var theURLval = window.document.getElementById('hidurl' + i).value;
var theURL1val = window.document.getElementById('hidurlhasframe' + i).value;

if (theURL1val =='1') {
//alert(theURL)
if( window.XMLHttpRequest )	//FF,NS,OP,IE7
{
	xmlHttp = new XMLHttpRequest();
}
else if( window.ActiveXObject )	//IE5 & 6
{
	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
 xmlHttp.open("GET", theURLval ,false);
xmlHttp.onreadystatechange = callback1;
xmlHttp.send(null); 
}
}
}



function getDoc(url, doFunc, id)
{
xmlHttp=null
if (window.XMLHttpRequest)
  {
  xmlHttp=new XMLHttpRequest()
  }
else if (window.ActiveXObject)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")
  }
if (xmlHttp!=null)
  {
//xmlHttp.open("GET", theURL , true);
//xmlHttp.onreadystatechange = callback11;
//xmlHttp.send(null); 

    xmlHttp.onreadystatechange= function() { 
        if (xmlHttp.readyState==4)
            if (xmlHttp.status==200)
                doFunc(xmlHttp, id);
    }

    xmlHttp.open("GET",url,false);
    xmlHttp.send(null);


  }
else
  {
  alert("Your browser does not support XMLHTTP.")
  }


}



function writeHTML(req, id) {
   // document.getElementById(id).innerHTML = req.responseText;

		//alert(xmlHttp.responseText);
		var returstr= req.responseText;
		var nIndexval= returstr.indexOf(' ', 4);
		//alert(nIndexval)
		
		var substrval = returstr.substr(4, nIndexval-4);
		//alert(substrval);


		var theDiv = window.document.getElementById('leftframe' + substrval + '_1' );
		//alert(theDiv.hieght);
		theDiv.innerHTML= req.responseText;
		
		//theDiv.hieght= 200;
		//alert(theDiv.hieght);
		theDiv.style.display='block';
		//alert('load next' + document.getElementById("curframe").value);
		

		//Loadpage1(curframe)

}





function Loadpage33()
{
//alert("here33")
var numframes = document.getElementById("totframecount").value;
var curframe ;
//var framenum ;
//framenum = document.getElementById("curframe").value;

for (var framenum=0; framenum <= numframes; framenum++)
{

var theIFra2 = window.document.getElementById('leftframe' + framenum);
var theURL = window.document.getElementById('hidurl' + framenum).value;
var theURL1 = window.document.getElementById('hidurlhasframe' + framenum).value;
//alert('URL value ' + theURL);



if (theURL1 =='1') {

//alert(theURL)
getDoc(theURL, writeHTML, framenum);

}

}

}





function hidehead()
{
//alert("hidehead")
//document.getElementById("headertemp").style.display='none';
}

function thistabs(seltirv, overall)
{    


}

function thistabs1(seltirv, overall)
{    

//alert("tabs");


var rowIndex = 0; // rowindex, in this case the first row of your table 
var table = document.getElementById('mytable'); // table to perform search on 

var row = table.getElementsByTagName('tr')[rowIndex]; 
alert(row.name);
var cells = row.getElementsByTagName('td'); 
var cellCount = cells.length; 
alert(cellCount);


var tbltabs = window.document.getElementById("tbltabs");
var imgs =tbltabs.getElementsByTagName("td");
alert(imgs.length);
var imgmax =80;



if (imgs != null){
//alert('ehe' + imgs.length);
for(i=0; i<imgs.length; i++)
{

	var sname = imgs[i].name;
	
	if (typeof imgs[i].name != 'undefined'     && typeof imgs[i].name !=     'undefined' )
	{
	alert(sname);
	if (sname.substr(0,5) == "xctab")
	{
		//alert("sname found " + sname )
        		if (seltirv  == i) {imgs[i].style.backgroundColor= 'red';}
			if (seltirv != i) {imgs[i].style.backgroundColor= '#e1e1e1';}

	}
	}

}
}

	
	

}


function filterportlet(frameportlet, filterval)
{
//alert("filterportletxx")
var divval = 'leftframe' + frameportlet + '_1';
urlval= "hidurl" + frameportlet;

var url = document.getElementById(urlval).value;
url= url + "&" + filterval +"&filt=1";
//alert(url);
//alert(divval);
fAJAXRequest( divval , url  , "" , "Getting Data..." , "Request Failed");
}

function Loadpage44()
{
//alert("Loadpage44")

var numframes = document.getElementById("totframecount").value;
var curframe ;
//var framenum ;
//framenum = document.getElementById("curframe").value;
//alert(numframes)
for (var framenum=0; framenum <= numframes; framenum++)
{
var theIFra2 = window.document.getElementById('leftframe' + framenum);

var theURL1 ="0" ;

var productElement = document.getElementById("hidurlhasframe" + framenum);
if (productElement != null)
{
theURL1 = window.document.getElementById('hidurlhasframe' + framenum).value;
}

var divval = 'leftframe' + framenum + '_1'

//
var theURL="";

//alert(framenum + ":" + theURL1)

if (theURL1 =='1') {
	theURL = window.document.getElementById('hidurl' + framenum).value;


	//alert('URL value ' + framenum + ":" + theURL + "divval" + divval);

	//alert('hidtextv' + framenum + ":" + theURL );

	//alert('URL value '  + thehelptext + ":" + framenum + ":"  );

	fAJAXRequest( divval , theURL  , "" , "Getting Data..." , "Request Failed");
	

}

if (theURL1 =='2' || theURL1 =='3' || theURL1 =='4'|| theURL1 =='5' || theURL1 =='6' || theURL1 =='7' || theURL1 =='8' || theURL1 =='9' || theURL1 =='10')
{
	theURL = window.document.getElementById('hidurl' + framenum).value;

	var frameids = window.document.getElementById('frameidvalue' + theURL1).value;
	var secids = window.document.getElementById('secidvalue' + theURL1).value;
	var sec1ids = window.document.getElementById('sec1idvalue' + theURL1).value;
	var sec2ids = window.document.getElementById('sec2idvalue' + theURL1).value;
	var sec3ids = window.document.getElementById('sec3idvalue' + theURL1).value;
	theURL = theURL + "&mult=1&secs=" + secids + "&sefs=" + frameids + "&segs=" + sec1ids + "&sems=" + sec2ids + "&sens=" + sec3ids 
	//alert(theURL )
	fAJAXRequest1( divval , theURL  , "" , "Getting Data..." , "Request Failed");
	//alert("done");
}






}

var newskin = window.document.getElementById('hasnewskin').value;

	var col1width =330
	var col2width = 330

	var col1cell = window.document.getElementById('col1cell');
	var col2cell = window.document.getElementById('col2cell');
	if (col2cell!=null){
		col2width = col2cell.scrollWidth -40

	}
	if (col1cell!=null){
		col1width = col1cell.scrollWidth -40

	}
	if (col2width>= 800 ){
		col2width= 800
	}

	if (col1width>= 800 ){
		col1width= 800
	}

	//alert('framenum ' + framenum +":" + col1width +":" + col2width )


if (newskin=="True" )
{
for (var framenum=0; framenum <= numframes; framenum++)
{
var theIFra2 = window.document.getElementById('leftframe' + framenum + '_1');
if (theIFra2 != null)
{


	var colposn = window.document.getElementById('colp' + framenum );
	if (col1cell!=null){
		colpos1 = window.document.getElementById('colp' + framenum ).value;
		if (colpos1 =="1")
		{
			var thediv1 = window.document.getElementById('bcontent' + framenum );
			thediv1.style.width= col1width;
			//alert("column1 " + thediv1.style.width)
		}
		if (colpos1 =="2")
		{
			var thediv1 = window.document.getElementById('bcontent' + framenum );
			thediv1.style.width= col2width;
			//alert("column2 " + thediv1.style.width)
		}
	}



}
}
}



var defskin = window.document.getElementById('defskin').value;
//alert(defskin)

if (defskin!=''){
for (var framenum=0; framenum <= numframes; framenum++)
{
//alert(framenum)
var theIFra2 = window.document.getElementById('leftframe' + framenum + '_1');
if (theIFra2 != null)
{
//alert('leftframe' + framenum + '_1' + ":" + theIFra2.name)
//alert('leftframe' + framenum + '_1' + theIFra2.name + ":" + theIFra2.clientHeight + ":" + theIFra2.scrollHeight)
if(theIFra2.scrollHeight> 550 ){
	//alert('leftframe' + framenum + '_1' + ":" + theIFra2.height)
	//alert('leftframe' + framenum + '_1' + ":" +theIFra2.scrollHeight  + ":" +  theIFra2.innerHTML)

	var newskin = window.document.getElementById('hasnewskin').value;
	//alert("newskin" + newskin + framenum )
	if (newskin!="True" )
	{
	var theIFra3 = window.document.getElementById('rcontent' + framenum );
	//alert('leftframe' + framenum + '_1' + ":" + theIFra3.className)
	theIFra3.className="roundedcornr_content_"+ defskin
	//alert('chng' + 'leftframe' + framenum + '_1' +":" + theIFra3.className)
	var theIFra31 = window.document.getElementById('tcontent' + framenum );
	theIFra31.className="roundedcornr_top_"+ defskin
	var theIFra4 = window.document.getElementById('bcontent' + framenum );
	theIFra4.className="roundedcornr_bottom_"+ defskin
	var theIFra5 = window.document.getElementById('bocontent' + framenum );
	theIFra5.className="roundedcornr_box_"+ defskin
	}

	if(theIFra2.scrollHeight> 1600 ){
	if (newskin=="True1" )
	{
	var theIFra3 = window.document.getElementById('rcontent' + framenum );
	//alert('leftframe' + framenum + '_1' + ":" + theIFra3.className)
	theIFra3.className="cssbox9"

	alert('chng' + 'leftframe' + framenum + '_1' +":" + theIFra3.className)
	var theIFra31 = window.document.getElementById('tcontent' + framenum );
	theIFra31.className="cssbox9_head"


	//alert('chng' + 'leftframe' + framenum + '_1' +":" + theIFra3.className)
	var theIFra32 = window.document.getElementById('bcontent' + framenum );
	theIFra32.className="cssbox9_body"

	}
	}


}
}
		//objDiv.style.display = 'none';
		//objFrame.display = 'inline';
		//objFrame.height = sheight;
		//theDiv.innerHTML
}
}

ShowEditDeleteButton();
resizeimgs();

var theIFra2115 = window.document.getElementById('menunav5');
//alert("zzz")
if (theIFra2115 != null)
{
//alert("show chat11 ")

// show messages for joining etc 
var parentValueid1 = window.document.getElementById('parentValueid').value ;
var parentTypeid1 = window.document.getElementById('parentTypeid').value ;
var parentEntityId1 = window.document.getElementById('parentEntityId').value ;

var skinidv = window.document.getElementById("skinId");
if (skinidv != null)
{
var skinid = window.document.getElementById("skinId").value ;
}
if (skinidv == null)
{
var skinid = "1" ;
}

//alert("XXX" + parentEntityId1  + ":" + theIFra2115.innerHTML)
if (parentEntityId1 =='4'){
	theIFra2115.innerHTML = "<iframe src='code/chat/ch2.asp?sctype=1&skinid=" + skinid   + "'  frameborder=no SCROLLING=no  STYLE=' z-index:-1'  width =150 HEIGHT=  360  ALLOWTRANSPARENCY=true> </iframe>";
}

if (parentEntityId1 =='6' ){
	theIFra2115.innerHTML = "<iframe src='code/chat/commch2.asp?sctype=1&userid=" + parentValueid1  + "&typeid=" + parentTypeid1 + "&skinid=" + skinid   + "' frameborder=no SCROLLING=no  STYLE=' z-index:-1'  width =150 HEIGHT=  360  ALLOWTRANSPARENCY=true> </iframe>";
}
//alert(theIFra2115.innerHTML)

}




var a=document.getElementsByName("f_joinfriends");
//alert(x.length);
if (a != null){
for(i=0; i<a.length; i++)
{
a[i].innerHTML = document.getElementById("jf").innerHTML;
}
}

var b=document.getElementsByName("f_join1friends");
var b1=document.getElementsByName("jf1");

//alert(x.length);
if (b != null && b1 != null){
for(i=0; i<b.length; i++)
{
b[i].innerHTML = document.getElementById("jf1").innerHTML;
}
}


var x=document.getElementsByName("f_invitefriends");
//alert(x.length);
for(i=0; i<x.length; i++)
{
x[i].innerHTML = document.getElementById("if").innerHTML;
}

var y=document.getElementsByName("f_joincomm");
//alert(y.length);
for(i=0; i<y.length; i++)
{
y[i].innerHTML = document.getElementById("jc").innerHTML;
}


var z=document.getElementsByName("f_joincommunity");
//alert(z.length);
for(i=0; i<z.length; i++)
{
z[i].innerHTML = document.getElementById("jy").innerHTML;
}

var theIFra211 = window.document.getElementById('menunav55');
if (theIFra211 != null)
{
// show messages for joining etc 
var ln = fixedtooltipdiv1( 500, 200)
}

//alert("zzzzzzzz")

tryskins()


}



function resizeimgs()
{

var imgs =document.getElementsByTagName("img");
//alert(imgs.length);
var imgmax =80;

if (imgs != null){
for(i=0; i<imgs.length; i++)
{
	var sname = imgs[i].name;
	if (sname.substr(0,3) == "img")

	{
		//alert("sname " + sname )
               if (sname.substr(0,5) == "imgin"){
                   //  alert("xx");
                     imgmax=60;
                }
		if (sname.substr(0,5) == "imgcn"){
                     //alert("xx");
                     imgmax=100;
                }
		//var imght1 = imgs[i].height ;

		var imght = imgs[i].height ;
		var imgwidth = imgs[i].width;
		//alert("imght " + imght  + " imght1  " + imght1)
		if (imght>= imgwidth )
		{
			if (imght> imgmax )
			{
				imgs[i].height= imgmax ;	
				var val1= (imgwidth/imght ) *imgmax ;
				var val2 = Math.abs(val1);
				imgs[i].width= val2;
			//alert (imgs[i].name + ":cc" +imght  + ":" + val2   );
			}
		}

		if (imght< imgwidth )
		{
			if (imgwidth> imgmax  )
			{
				imgs[i].width=imgmax;
				var val1= (imght/imgwidth ) * imgmax ;
				var val2 = Math.abs(val1);
				imgs[i].height= val2;

				
			//alert (imgs[i].name + "vv:" +imght  + ":" + val2);
			}
		}

		
	}


}
}


}


function callback11() 
{	
  var curframe;
   if(xmlHttp.readyState == 4) {
   
      if(xmlHttp.status == 200) {
		
		//alert(xmlHttp.responseText);
		var returstr= xmlHttp.responseText;
		var nIndexval= returstr.indexOf(' ', 4);
		//alert(nIndexval)
		
		var substrval = returstr.substr(4, nIndexval-4);
		//alert(substrval);


		var theDiv = window.document.getElementById('leftframe' + substrval + '_1' );
		//alert(theDiv.hieght);
		theDiv.innerHTML= xmlHttp.responseText;
		
		//theDiv.hieght= 200;
		//alert(theDiv.hieght);
		theDiv.style.display='block';
		//alert('load next' + document.getElementById("curframe").value);
		

		//Loadpage1(curframe)

      }

   }
  
}

function Saveupdate(actionid)
{
//alert("here")
var text6val = document.getElementById("text6").value;

///alert(text6val );
//var publicdata = document.getElementById("Publicdata").value;
//var notifyval = document.getElementById("Notifybymail").value;

if (text6val=="") {
	alert("Please enter a Valid Name/Title.");
	document.getElementById("text6").focus();
	return false;
}


document.display.hState.value="82";
//alert(document.display.hState.value)
document.display.submit();



}


function Postcomment(subtype,frameval)
{
//alert("herex")
//var text6val = document.getElementById("text6").value;
//if (text6val=="") {
//	alert("Please enter a Valid Name/Title.");
//	document.getElementById("text6").focus();
//	return false;
//}


document.getElementById("subtype").value= subtype;
document.getElementById("loadframe").value= frameval;
document.display.hState.value="83";
//alert(document.display.hState.value)
document.display.submit();

//callServer();

}


function callServer() {

document.getElementById('section4').style.display='block';
document.getElementById('section5').style.display= 'none';

xmlHttp=null
if (window.XMLHttpRequest)
  {
  xmlHttp=new XMLHttpRequest()
  }
else if (window.ActiveXObject)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")
  }
if (xmlHttp!=null)
{

if (CKEDITOR.instances['HTML1'] != null){
  	var html1  = CKEDITOR.instances['HTML1'].getData();
  	//alert(html1);
	CKEDITOR.instances['HTML1'].setData('');
	
}
if (CKEDITOR.instances['HTML1'] == null){
  	var html1  = document.getElementById("HTML1").value;
 	//alert(html1);
	document.getElementById("HTML1").value= '';
}

  // Get the city and state from the Web form
  var typeid= document.getElementById("Typeid").value;
  var subtype = document.getElementById("subtype").value;
  var EntityValue = document.getElementById("EntityValue").value;
  var EntityId = document.getElementById("EntityId").value;

  var xmlString = '<?xml version="1.0"?><profile>' +
    "  <typeid>" + typeid + "</typeid>" +
    "  <subtype>" + escape(subtype) + "</subtype>" +
    "  <html1>" + escape(html1) + "</html1>" +
    "  <EntityValue>" + escape(EntityValue) + "</EntityValue>" +
    "  <EntityId>" + escape(EntityId) + "</EntityId>" +
    "</profile>";

    alert(xmlString)

  // Build the URL to connect to
  var url = "updatedata.asp";

  // Open a connection to the server
  xmlHttp.open("POST", url, false);

  // Tell the server you're sending it XML
  xmlHttp.setRequestHeader("Content-Type", "text/xml");

  // Set up a function for the server to run when it's done
  xmlHttp.onreadystatechange = confirmUpdate;

  // Send the request
  xmlHttp.send(xmlString);
  //alert("send");
}


}


function confirmUpdate() 
{	
  var curframe;
   if(xmlHttp.readyState == 4) {
   	alert(xmlHttp.status);
      if(xmlHttp.status == 200) {
		//alert("here");
		alert(xmlHttp.responseText);
		//left1frame_1
		var frmval = document.getElementById("loadframe").value;

		if ( window.frames != null ) {
    			for ( i = 0; i< window.frames.length; i++ )
  			{
      				// window.alert ("Child window" +i+ " is named " );
				var strFramename1 = window.frames[i].name 
				if (strFramename1 == frmval ) 
				{

					//window.alert ("Process Child window " + strFramename1 );
					window.frames[i].location.reload(true);

				}
			}
		}
	}
	}
}


function Loadpage22()
{
//alert("here")
var numframes = document.getElementById("totframecount").value;
var curframe ;
//var framenum ;
//framenum = document.getElementById("curframe").value;

for (var framenum=0; framenum <= numframes; framenum++)
{

var theIFra2 = window.document.getElementById('leftframe' + framenum);
var theURL = window.document.getElementById('hidurl' + framenum).value;
var theURL1 = window.document.getElementById('hidurlhasframe' + framenum).value;
//alert('URL value ' + theURL);



if (theURL1 =='1') {

//alert(theURL)
xmlHttp=null
if (window.XMLHttpRequest)
  {
  xmlHttp=new XMLHttpRequest()
  }
else if (window.ActiveXObject)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")
  }
if (xmlHttp!=null)
  {
  //xmlhttp.onreadystatechange=state_Change
  //xmlhttp.open("GET",url,true)
  //xmlhttp.send(null)
xmlHttp.open("GET", theURL , false);
xmlHttp.onreadystatechange = callback11;
xmlHttp.send(null); 


  }
else
  {
  alert("Your browser does not support XMLHTTP.")
  }



}

}



}




function callback2() 
{	
  var curframe;
   if(xmlHttp.readyState == 4) {
   
      if(xmlHttp.status == 200) {
		
		//alert(xmlHttp.responseText);
		var returstr= xmlHttp.responseText;
		var nIndexval= returstr.indexOf(' ', 4);
		//alert(nIndexval)
		
		var substrval = returstr.substr(4, nIndexval-4);
		//alert(substrval);


		var theDiv = window.document.getElementById('leftframe' + substrval + '_1' );
		//alert(theDiv.hieght);
		theDiv.innerHTML= xmlHttp.responseText;
		
		//theDiv.hieght= 200;
		//alert(theDiv.hieght);
		theDiv.style.display='block';
		//alert('load next' + document.getElementById("curframe").value);
		
		curframe = parseInt(document.getElementById("curframe").value)    



		var numframes = document.getElementById("totframecount").value;
		if (curframe ==numframes ) {
			curframe = 0
			document.getElementById("curframe").value= curframe ;
			//alert(document.getElementById("curframe").value)
			//alert("done here ")
			return;
		}
		curframe = curframe  + 1;
		//alert(curframe)
		document.getElementById("curframe").value= curframe ;
		//alert('load next111' + curframe)
		var t=setTimeout("Loadpage1()",20)

		//Loadpage1(curframe)

      }
      if(xmlHttp.status != 200) {
		//alert(xmlHttp.responseText);
		curframe = parseInt(document.getElementById("curframe").value)   + 1; 
		//alert(curframe)
		document.getElementById("curframe").value= curframe ;
		var numframes1 = document.getElementById("totframecount").value;
		if (curframe ==numframes1 ) {
			curframe = 0
			document.getElementById("curframe").value= curframe ;
			//alert(document.getElementById("curframe").value)
			alert("done here 111")

			return;
		}

		//alert('Problem in Loading:' + xmlHttp.status + ' URL:' + xmlHttp.URL + ' curframe:' + curframe)
		var t=setTimeout("Loadpage1()",200)		
	}

   }
  
}


function Loadpage1()
{
var numframes = document.getElementById("totframecount").value;
var curframe ;
var framenum ;
framenum = document.getElementById("curframe").value;
//if (framenum ==numframes ) {
//	alert('done');
//	return;
//}
//alert("loadpage1 " + framenum + ":"+ numframes );

var theIFra2 = window.document.getElementById('leftframe' + framenum);
var theURL = window.document.getElementById('hidurl' + framenum).value;
var theURL1 = window.document.getElementById('hidurlhasframe' + framenum).value;
//alert('URL value ' + theURL);



if (theURL1 =='1') {

//alert(theURL)
xmlHttp=null
if (window.XMLHttpRequest)
  {
  xmlHttp=new XMLHttpRequest()
  }
else if (window.ActiveXObject)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")
  }
if (xmlHttp!=null)
  {
  //xmlhttp.onreadystatechange=state_Change
  //xmlhttp.open("GET",url,true)
  //xmlhttp.send(null)
xmlHttp.open("GET", theURL , true);
xmlHttp.onreadystatechange = callback2;
xmlHttp.send(null); 


  }
else
  {
  alert("Your browser does not support XMLHTTP.")
  }



}



if (theURL1 !='1') {
	
	curframe = parseInt(framenum) +1;
	//alert('goto next skip this' + curframe );
	document.getElementById("curframe").value = curframe 

	Loadpage1(curframe);
}


}





function collsize(atype)
{	
	var frameCounter = document.getElementById("controller").value;
	var aheight=document.getElementById('aheight' + frameCounter).value;
	var objHeight = document.getElementById('leftframe' + frameCounter + '_1');
	var theIFra = document.getElementById('leftframe' + frameCounter);
	var ismax=document.getElementById('minmax' + frameCounter).value;
		
		
	if (ismax=="0")
	{	
		if (atype=="0")
		{
			objHeight.style.height=aheight;
			theIFra.style.height=aheight;
			return;
		}
		if (atype=="1")
		{
			objHeight.style.height=400;
			theIFra.style.height=400;
		}
	}
	
}




function AdjustHeight1()
{

//alert("adjusthieght");
var frameCounter = document.getElementById("controller").value;
//alert(document.getElementById("headertop").scrollHeight);
//absTOP= absTOP ;
//alert(absTOP);

//alert('adjusthieght' );





//if( document.all){
if ( window.frames != null ) {
 //alert(window.frames.length)
    for ( i = 0; i< window.frames.length; i++ )
  {
      // window.alert ("Child window" +i+ " is named " );
	var strFramename1 = window.frames[i].name 
	if (strFramename1 != '') 
	{
		//window.alert ("Process Child window " + strFramename1 );
		var objFrame = window.document.getElementById(strFramename1);
		//alert(objFrame.name);
		//alert(objFrame.src);

		var strHTML = window.frames[i].document.body.innerHTML;
		//alert(strHTML);
		
		var strFramename = window.frames[i].name +  "_2" ;
		var objDiv = document.getElementById(strFramename);
		//alert("here")
		//alert(objDiv.name);
		//var objDiv = document.getElementById("leftframe999_2");
		objDiv.width = objFrame.width;
		//alert("xx1");
		//alert(strHTML);

		//dont do for invite portlet
		//No invites sent so far 

		var nIndexval = strHTML.indexOf('No invites sent so far', 0);
		//alert(nIndexval);

                if (nIndexval== 0)
                {
		//alert(nIndexval);
		objDiv.innerHTML = strHTML;
		//alert("xx2");
		
		
		var sheight = objDiv.scrollHeight;
		//alert("sheight  " & sheight )
		if (sheight  == 0){
			sheight= 300
		}
		sheight = sheight +40;
		
		objDiv.innerHTML="";
		//objDiv.style.display = 'none';
		objFrame.display = 'inline';
		objFrame.height = sheight;
		//alert(sheight);

		}
	}
//}

}
}




//alert('done')
Loadpage44();
//alert(document.getElementById("jf").value)
//document.getElementById("f_joincomm").innerHTML = document.getElementById("jc").value;
//document.getElementById("f_joincommunity").innerHTML = document.getElementById("jy").value;
}


function AdjustHeightsub()
{

//alert("adjusthieghtsub");
//var frameCounter = document.getElementById("controller").value;
//alert(document.getElementById("headertop").scrollHeight);
//absTOP= absTOP ;
//alert(absTOP);

//alert('adjusthieght' );
//if( document.all){
if ( window.frames != null ) {
 //alert(window.frames.length)
    for ( i = 0; i< window.frames.length; i++ )
  {
       // window.alert ("Child window" +i+ " is named "+window.frames[i].name);
	var strFramename1 = window.frames[i].name 
	if (strFramename1 != '') 
	{
		//alert("1")
		//window.alert ("Process Child window " + strFramename1 );
		var objFrame = window.document.getElementById(strFramename1);
		//alert(objFrame.name);
		//alert(objFrame.src);
		
		//if ( window.frames[i].document){
		//alert("11")
		var strHTML = window.frames[i].document.body.innerHTML;
		//alert(strHTML);
		//alert("21")
		var strFramename = window.frames[i].name +  "_2" ;
		var objDiv = document.getElementById(strFramename);

		//alert(objDiv.name);
		//var objDiv = document.getElementById("leftframe999_2");
		objDiv.width = objFrame.width;
		//alert(objDiv.name);
		objDiv.innerHTML = strHTML;
		//alert("22")
		var sheight = objDiv.scrollHeight;
		//alert("sheight  " + sheight )
		if (sheight  == 0){
			sheight= 400
		}
		sheight = sheight +40;
		//objDiv.innerHTML = "";
		
		objFrame.display = 'inline';
		objFrame.height = sheight;
		objDiv.innerHTML="";
		//alert(sheight);
		//objDiv.innerHTML = "";
		//  objDiv.height="0";
		//}
	}
//}

}
}




//alert('done')
Loadpage44();
//alert(document.getElementById("jf").value)
//document.getElementById("f_joincomm").innerHTML = document.getElementById("jc").value;
//document.getElementById("f_joincommunity").innerHTML = document.getElementById("jy").value;
}




function AdjustHeightsub1()
{
//alert("adjusthieghtsub");

//if( document.all){
if ( window.frames != null ) {
     for ( i = 0; i< window.frames.length; i++ )
  {
       // window.alert ("Child window" +i+ " is named "+window.frames[i].name);
	var strFramename1 = window.frames[i].name 
	if (strFramename1 != '') 
	{
		//window.alert ("Process Child window " + strFramename1 );
		var objFrame = window.document.getElementById(strFramename1);
		//alert(objFrame.name);
		//alert(objFrame.src);

		var strHTML = window.frames[i].document.body.innerHTML;
		var nIndexval= strHTML.indexOf('<!--stsection-->', 1);
		//alert("nIndexval" + nIndexval)

		var nIndexval1= strHTML.indexOf('<!--etsection-->', 1);
		//alert("nIndexval1" + nIndexval1)
		var substrval = strHTML.substr(nIndexval,  nIndexval1-nIndexval);
		//alert("3" + substrval )

		var strFramename = window.frames[i].name +  "_2" ;
		var objDiv = document.getElementById(strFramename);
		//var objDiv = document.getElementById("leftframe999_2");
		
		//alert(objFrame.width + ":" + objFrame. offsetWidth + ":" + objFrame.scrollWidth  );
		objDiv.width = objFrame.scrollWidth;
		//alert(objDiv.width + "width of div:" );
		//alert("strHTML" + substrval )
		objDiv.innerHTML =substrval;
		var sheight1 = objDiv.Height;
		var sheight = objDiv.scrollHeight;
		var sheight2 = objDiv.offsetHeight;

		//alert("sheight  " + sheight + "ll" + sheight1 + "ll" + sheight2 )
		if (sheight  == 0){
			sheight= 500
		}
		sheight = sheight +40;
		
		
		objDiv.style.display = 'none';
		objFrame.display = 'inline';
		objFrame.height = sheight;
		//alert(sheight);
	}
}

}
//}



}




function AdjustHeightsubs()
{

//alert("adjusthieghtsubsccc");
//var frameCounter = document.getElementById("controller").value;
//alert(document.getElementById("headertop").scrollHeight);
//absTOP= absTOP ;
//alert(absTOP);

//alert('adjusthieght' );
//if( document.all){
//alert('1')

if ( window.frames != null ) {
//alert('2')

 //alert(window.frames.length)
    for ( i = 0; i< window.frames.length; i++ )
  {
       // window.alert ("Child window" +i+ " is named "+window.frames[i].name);
	var strFramename1 = window.frames[i].name 
	if (strFramename1 != '') 
	{
		//window.alert ("Process Child window " + strFramename1 );
		var objFrame = window.document.getElementById(strFramename1);
		//alert(objFrame.name);
		//alert(objFrame.src);

		var strHTML = window.frames[i].document.body.innerHTML;
		//alert(strHTML);
		
		var strFramename = window.frames[i].name +  "_2" ;
		var objDiv = document.getElementById(strFramename);
		//var objDiv = document.getElementById("leftframe999_2");
		objDiv.width = objFrame.width;
		//alert(objDiv.name);
		objDiv.innerHTML = strHTML;

		var sheight = objDiv.scrollHeight;
		//alert("sheight  " + sheight )
		if (sheight  == 0){
			sheight= 300
		}
		sheight = sheight +40;
		//objDiv.innerHTML = "";
		
		objFrame.display = 'inline';
		objFrame.height = sheight;
		objDiv.innerHTML="";
		//alert(sheight);
		//objDiv.innerHTML = "";
		//  objDiv.height="0";
	}
}

}
//}

}



function setfrsize(j)
	{ 
		var urlid="url" + j;
		var surl=window.document.getElementById(urlid).value;
		var urlsub=surl.substr(0, 8);
		var urlsub2=surl.substr(0, 21);
		
		
		var stype=document.getElementById("stype" + j).value;
		
		
		if ((urlsub.toLowerCase()=="portlet.") && (stype != 38))
		{
   			var frname1="leftframe"+j;
   			var objFrame = window.document.getElementById(frname1);
   			var swidth = objFrame.style.width;

		
   			if (objFrame != null)
   			{  
   				//alert(objFrame.location.src);
   				var sframe="leftframe" + j + '_1';
   				var strHTML = window.frames.eval("leftframe"+j).document.body.innerHTML;
   				var objDiv = document.getElementById(sframe);
   				var ww = objFrame.scrollWidth;
   				objDiv.style.width = ww;
   				//strHTML="<iframe width=100% src=" + surl  + " name=leftframe" + j + " id=leftframe" + j + ">" + strHTML + "</iframe>";
   				objDiv.innerHTML = strHTML;
   				var sheight = objDiv.scrollHeight;
   				//alert(sheight);
   				//var newheight=sheight + 13;
   				
   				if (ww < objDiv.scrollWidth) 
                  { var newheight=sheight + 13; }
                else 
                  { var newheight=sheight;  }
                                   
                                   
   				//objDiv.innerHTML = "<iframe MARGINHEIGHT=0 frameborder=no SCROLLING=auto width=" + ww + " height=" + newheight + " src=" + surl  + " name=leftframe" + j + " id=leftframe" + j + ">"  + objDiv.innerHTML + "</iframe>";
   				   				
   				//objFrame.width=ww;

   				//objDiv.style.overflowX = 'auto';
   				//objFrame.height = sheight + 140;
   				objDiv.height = sheight - 10;
   				//alert(objFrame.height);
   			}
		}
	}


/////No further editting needed code for new drp down menu

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
//alert("hide main")

if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
delayhidemenu1()

}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thewidth, thecolor){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML="<font size =1 color =#444444>" + thetext + "</font>"
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var nondefaultpos=false
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth){
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true
}
else if (curX<leftedge)
tipobj.style.left="5px"
else{
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"
}

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight){
tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true
}
else{
tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
tipobj.style.visibility="visible"
if (!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

// DROP DOWN MENU for sub MENU

var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu1();" onMouseout="dynamichide1(event)"></div>')

function iecompattest1(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth){
if (!document.all&&!document.getElementById)
return
clearhidemenu1()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? iecompattest1().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest1().clientHeight-eventY : window.innerHeight-eventY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? iecompattest1().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left=ie5? iecompattest1().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.style.top=ie5? iecompattest1().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
else
menuobj.style.top=ie5? iecompattest1().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
menuobj.style.visibility="visible"
return false
}

function contains_ns61(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu1(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}

function dynamichide1(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu1()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns61(e.currentTarget, e.relatedTarget))
hidemenu1()
}

function delayhidemenu1(){
delayhide=setTimeout("hidemenu1()",500)
}

function clearhidemenu1(){
if (window.delayhide)
clearTimeout(delayhide)
}

function hidesubmenu1(){
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
if (window.menuobj){
menuobj.style.visibility="hidden"
alert("hide ")
}
}





if (ie5||ns6)
document.onclick=hidemenu1


if (ie5||ns6)
document.onMouseover=hidemenu1




