/* -------------------------------------------------------------*/
/* ---------->>> XO-ICP, Author - Ranjith kumar R  <<<-----------*/
/* -------------------------------------------------------------*/
function OpenNewWindow(url, title, height, width)
{
    window.open(url, title, "height="+ height + ",width="+ width + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}

function OpenModalWindow(url, height, width)
{
    window.showModalDialog(url,self,"dialogHeight:" + height + "px;dialogWidth:"  + width + "px;status:no;resizable:yes;");
    window.location.href = "PayYourBill.aspx";
    return false; 
}
function OpenModalWindowTT(url, height, width)
{
    window.showModalDialog(url,self,"dialogHeight:" + height + "px;dialogWidth:"  + width + "px;status:no;resizable:yes;");
    window.location.href = "../Registration/ContactUs.aspx";
    return false; 
}
function OpenModalWindow1(url, height, width)
{
    window.showModalDialog(url,self,"dialogHeight:" + height + "px;dialogWidth:"  + width + "px;status:no;resizable:yes;");
    return false; 
}

/*Function to be called for creation of modal window from both IE and mozilla*/
function modalWin(url, height, width)
{
    if (window.showModalDialog) 
    {
       window.showModalDialog(url,self,"dialogHeight:" + height + "px;dialogWidth:"  + width + "px;status:no;resizable:yes;");
    }
    else
    {
        window.open(url,self,"height="+ height + ",width="+ width + ",toolbar=no,directories=no,status=no,continued from previous linemenubar=no,scrollbars=no,resizable=no ,modal=yes");
    }
   return false;
}

function displaydate()
{
	var month_arr= new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
	var day_arr = new Array("Sunday", "Monday","Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
	var login_date = new Date();
	var login_month=month_arr[login_date.getMonth()];
	var login_day=day_arr[login_date.getDay()];
	var login_date=login_date.getDate();
	var full_date=login_day+"&nbsp;"+login_date+"&nbsp;"+login_month;
	document.getElementById("login_date").innerHTML=full_date;
}

function set_height()
{
	var content_height;
	content_height=document.getElementById("left_content_wrapper").offsetHeight
	document.getElementById("quick_links").style.height=content_height;	
}

function togglefeatures(btn_id, block_id)
{ 
var buttonid=btn_id;
var blockid=block_id;
	if (document.getElementById(blockid).style.display=="block")
	{
			document.getElementById(blockid).style.display="none";		
			document.getElementById(buttonid).src="../images/btn_tree_expand.gif";			
	}
	else
	{
		document.getElementById(blockid).style.display="block";
		document.getElementById(buttonid).src="../images/btn_tree_collapse.gif";					
		return false;
	}
}
function chngetored(row_id,txt_id,status_id)
{
var rowid=row_id;
var txtid=txt_id;
var statusid=status_id;
if(document.getElementById(txtid).innerHTML=="Remove")
{
	document.getElementById(txtid).innerHTML="Revert Changes";
/*	document.getElementById(rowid).className="redbg";*/
	document.getElementById(statusid).innerHTML="Removed";		
}
else
{
//	alert('second condition - txt revert');
/*	document.getElementById(rowid).className="graybg";	*/
	document.getElementById(txtid).innerHTML="Remove";
	document.getElementById(statusid).innerHTML="Normal";	
}
return false;
}

function popstatic(url)
{
	var newwindow;
	newwindow=window.open(url,'popup_1','width=525,height=500,top=50,left=50,scrollbars=yes,titlebar=yes');
	if (window.focus)
	{
		newwindow.focus();
	}
}
dynTabs=function() {
			if(n=document.getElementById('quick_tour')) {
			dynDivs=n.getElementsByTagName('div');
			
			oo=document.getElementById('tab_icons');
			dynAs=oo.getElementsByTagName('a');


		for(i=0;i<dynAs.length;i++) {
			dynAs[i].onclick= function(){
				myTabs = this.parentNode.parentNode.getElementsByTagName("img");
				for(i=0;i<myTabs.length;i++){
					myTabs[i].src = myTabs[i].src.replace(/_on\./, '_off.');
					}
				this.getElementsByTagName("img")[0].src = this.getElementsByTagName("img")[0].src.replace(/_off\./, '_on.');
				
				var currentDiv=0;
				for(i=0;i<dynDivs.length;i++) {
					if(dynDivs[i].className=="dyn-tab-item") {
						if(currentDiv == (this.name-1)) dynDivs[i].id='on';
						else {dynDivs[i].id='off';
						}
						currentDiv++;
					}
				}
			}
 		}
	}
}

/*$(document).ready(function() {	
	$('#tab_icons > h4 > a > img').each(function (i){
		var univCurrArr = $(this).attr('id').split("_");
		var univImgId = univCurrArr[univCurrArr.length-1];
		var univImgNo = parseInt(univImgId.replace("imgRightTab",""));
		if(univImgNo == 1) {
			$(this).hide();
		} else if(univImgNo == 12) {
			$(this).show();
		} else if(univImgNo > 0 && univImgNo < 6) {
			$(this).show();
		}else{
			$(this).hide();
		}
	});	
	$("#" + "imgRightTab1" + "Content").show();
	$('#tab_icons > h4 > a > img').click(function(){
		var currArr = $(this).attr('id').split("_");
		var currImgId = currArr[currArr.length-1];
		var currImgNo = parseInt(currImgId.replace("imgRightTab",""));
		var nextImgNo = (currImgNo * 10) + 2;
		if(currImgNo < 6){
		$('#tab_icons > h4 > a > img').each(function (i){

				var thisArr = $(this).attr('id').split("_");
				var thisImgId = thisArr[thisArr.length-1];
				var thisImgNo = parseInt(thisImgId.replace("imgRightTab",""));
				if(thisImgNo == currImgNo) {
					$(this).hide();
					$("#" + "imgRightTab" + thisImgNo + "Content").show();
				} else if(thisImgNo == nextImgNo) {
					$(this).show();
					$("#" + "imgRightTab" + thisImgNo + "Content").hide()
				} else if(thisImgNo > 0 && thisImgNo < 6) {
					$(this).show();
					$("#" + "imgRightTab" + thisImgNo + "Content").hide()
				}else{
					$(this).hide();
				}
		});
		}		

 	});

 });*/

