﻿// JScript File
/* for aspx page */


function ShowFAQCategory(Name, FQuestionCount) {
	var QuestionCategory = 6;
	var temp, temp1;
	for (var x = 1; x <= QuestionCategory; x++) {
		temp = "Q" + x;
		temp1 = "C" + x;
		//alert(temp);
		if (Name == temp) {
			document.getElementById(temp).style.display = "block";
			document.getElementById(temp1).src = "images/FAQ/" + temp + "-blu.gif";
			
			/* for Expand All & Collapse All */
			document.getElementById("FAQCategory").value = Name;
			document.getElementById("QuestionCount").value = FQuestionCount;
		} else {
			document.getElementById(temp).style.display = "none";
			document.getElementById(temp1).src = "images/FAQ/" + temp + "-gry.gif";
			
		}
	}
}

function ChangeFAQStatus(Name) {
	if (document.getElementById(Name).style.display == "none") {
		document.getElementById(Name).style.display = "block";
		document.getElementById(Name + "li").style.listStyleImage ="url('images/FAQ/bullet-arrow-down.gif')";
	} else {
		document.getElementById(Name).style.display = "none";
		document.getElementById(Name + "li").style.listStyleImage ="url('images/FAQ/bullet-arrow-right.gif')";	
	}
}

function openPopImg(htmName, windowTitle, windowWidth, windowHeight){
	popImg = window.open(htmName, windowTitle,
    "toolbar=no,scrollbars=yes,resizable=yes,width=" 
    + (parseInt(windowWidth)+20)  + ",height=" 
    + (parseInt(windowHeight)+15)) 
}

function FAQExpandAll() 
{
    var Name = document.getElementById("FAQCategory").value
    var QuestionCount = document.getElementById("QuestionCount").value
    
    for (var x = 1; x <= QuestionCount; x++) 
    {
        document.getElementById(Name+"A"+x).style.display = "block";
    }
}

function FAQCollapseAll() 
{
    var Name = document.getElementById("FAQCategory").value
    var QuestionCount = document.getElementById("QuestionCount").value
    
    for (var x = 1; x <= QuestionCount; x++) 
    {
        document.getElementById(Name+"A"+x).style.display = "none";
    }
}

/* My Account */
function sendpassword(){
  url="sendpassword.asp";
  newWindow = window.open(url,"neww","left=310,top=230,toolbars=no,location=no,directories=no,status=no,menubars=no,scrollbars=yes,titlebar=no,resizable=no,width=400,height=220");
}
  
function update(){
  url="profile-update.asp";
  newWindow = window.open(url,"neww","left=310,top=230,toolbars=no,location=no,directories=no,status=no,menubars=no,scrollbars=yes,titlebar=no,resizable=no,width=500,height=220");
} 
