document.write("<scri"+"pt type='text/javascript' src='/jquery-1.6.4.min.js'></scri"+"pt>");
document.write("<scri"+"pt type='text/javascript' src='/jquery-elastic.js'></scri"+"pt>");
document.write("<scri"+"pt type='text/javascript' src='/addblog_js.js'></scri"+"pt>");

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function changeTab(p){
if (p=='T1')
{
document.getElementById("T1").src='images/tComments_on.gif';
document.getElementById("T2").src='images/tBlog_off1.gif';
//document.getElementById("T3").src='images/tQA_off1.gif';
document.getElementById("T3").src='images/tforum_off1.gif';
}
else if (p=='T2')
{
document.getElementById("T1").src='images/tComments_off2.gif';
document.getElementById("T2").src='images/tBlog_on.gif';
//document.getElementById("T3").src='images/tQA_off11.gif';
document.getElementById("T3").src='images/tforum_off1.gif';
}
/*else if (p=='T3')
{
document.getElementById("T1").src='images/tComments_off1.gif';
document.getElementById("T2").src='images/tBlog_off2.gif';
//document.getElementById("T3").src='images/tQA_on.gif';
document.getElementById("T4").src='images/tforum_off1.gif';
}
*/
else if (p=='T3')
{
document.getElementById("T1").src='images/tComments_off1.gif';
document.getElementById("T2").src='images/tBlog_off2.gif';
//document.getElementById("T3").src='images/tQA_off2.gif';
document.getElementById("T3").src='images/tforum_on.gif';
}
}

function searchme(){
	if(document.frmSearch.query.value=="Search Staircase" || document.frmSearch.query.value==""){
		alert("Enter Search value");
		document.frmSearch.query.focus();
		return false;
	}
}
var timerID = 0;
var tabs = new Array();
tabs = "comm,blog,forum".split(",");
curTab = 0;
function switchTab()
{
	curTab = curTab + 1;
	if (curTab>2)
		curTab = 0;
	changeTab("T" + (curTab + 1));
	showContent("getblogcomments.asp?ctype=" + tabs[curTab],"blogNcomment");
	timerID=setTimeout ( "switchTab()", 8000);
}
function StopSwitchTab() {
   if(timerID) {
      clearTimeout(timerID);
      timerID  = 0;
   }
}
function printcontent(){
	window.open(printcontent.arguments[0],'','addressbar=no,menubar=no,scrollbars=yes,status=no,width=650,height=600')
}
function fopop(){
window.open(fopop.arguments[0],'scTerms','width=500,height=580,addressbar=no,status=no,scrollbars=yes');
}
function deleteRecord(url)
{
	if(confirm("Are you sure?"))
	{
		document.location.href = url;
	}
}
function pvtGroupMsg()
{
	alert("This is a private group!");
}
function openPopup(url,title,width,height)
{
	var newWin = window.open(url,title,'width=' + width + ',height=' + height + ',addressbar=no,status=no,scrollbars=yes');
	newWin.focus();
}
function ShowHideMenu(){
	if(document.getElementById('Smenu').style.display=='none'){
		document.getElementById('accountMenu').style.backgroundColor='#f4f4f4';
		document.getElementById('accountMenu').style.backgroundImage='url(/images/bullet_arrow_up.png)';
		document.getElementById('accountMenu').style.backgroundPosition='right';
		document.getElementById('accountMenu').style.backgroundRepeat='no-repeat';
		document.getElementById('accountMenu').style.color="#000000";
		document.getElementById('Smenu').style.display='';
	}else{
		document.getElementById('accountMenu').style.backgroundColor='';
		document.getElementById('accountMenu').style.backgroundImage='url(/images/bullet_arrow_down.png)';
		document.getElementById('accountMenu').style.backgroundPosition='right';
		document.getElementById('accountMenu').style.backgroundRepeat='no-repeat';
		document.getElementById('accountMenu').style.color="#ffffff";
		document.getElementById('Smenu').style.display='none';
	}
}
function hideMenuLogin(){
	document.getElementById('accountMenu').style.backgroundColor='';
	document.getElementById('accountMenu').style.backgroundImage='url(/images/bullet_arrow_down.png)';
	document.getElementById('accountMenu').style.backgroundPosition='right';
	document.getElementById('accountMenu').style.backgroundRepeat='no-repeat';
	document.getElementById('accountMenu').style.color="#ffffff";
	document.getElementById('Smenu').style.display='none';
}
function setBorder(id,total,xid)
{
for (var i = 1; i <= total; i++) {
	if (id==i){
		document.getElementById(xid+i).style.border = '1px solid #000000';
	}
	else{
		document.getElementById(xid+i).style.border = '0px solid #000000';
	}
}
}
