// JavaScript Document
/* Common values for the ReadyState of the XMLHttpRequest object */
<!-- 

var READYSTATE_UNINITIALIZED = 0;
var READYSTATE_LOADING = 1;
var READYSTATE_LOADED = 2;
var READYSTATE_INTERACTIVE = 3;
var READYSTATE_COMPLETE = 4;

// It will Create xmlHttpRequest Object.
function createXMLHttpRequest()
{
	if(window.ActiveXObject)
	{
		var msxmls = new Array("MSXML2.XMLHTTP.7.0","MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0",
							   "MSXML2.XMLHTTP","Microsoft.XMLHTTP");
		for(var i=0;i < msxmls.length;i++)
		{
			try
			{
				return new ActiveXObject(msxmls[i]);
			}
			catch(e)
			{}
		}
	}
	else
	{
		return new XMLHttpRequest();
	}
	throw new Error("Could Not instantiate XMLHttpRequest.");
}

// It will Bind dropdown List.
var xmlHttp = createXMLHttpRequest();

function showLoading(obj)
{
	var load = document.getElementById(obj);
	if(load.style.display == "none")
		load.style.display = "block";
	else 
		load.style.display = "none";
}
var xmlTemp;

function getRequestData(fullURL, method, dataType)
{
    if(xmlHttp)
    {
        xmlHttp.open(method, fullURL, true);
        xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
        xmlHttp.onreadystatechange = function()
        {
	        if(xmlHttp.readyState == READYSTATE_COMPLETE)
	        {
		        if(xmlHttp.status == 200 || xmlHttp.status == 0)
		        {
                    writeData(xmlHttp.responseXML);
		        }
		        else
			        alert("Error Occurred!");
	        }
        }
        xmlHttp.send(null);
    }
}

// Home page Menu Control Script: don't change !!

function displayMenu(Source, Obj)
{
    if(Source == null || Obj == null)
        return;
    if (oldImgId)
    {
        if (Source.name!=oldImgId.name)
        {
            imgSource = Source;
            div = document.getElementById(Obj);
            /*hideAll();
            div.style.display = "block";
            changeImageName(oldImgId, 2);
            changeImageName(Source, 1);
            oldImgId = Source;*/
            blind_effect.start();
        }
    }
    else
    {
        imgSource = Source;
        div = document.getElementById(Obj);
        hideAll();
        div.style.display = "block";
        changeImageName(imgSource, 1);
        oldImgId = imgSource;
        blind_effect_start.start();
    }
}

function mOverImgChange(Source)
{
    imgSource = Source;
    changeImageName(imgSource, 1);
}
function mOutImgChange(Source)
{
    if (oldImgId)
    {
        if (Source.name!=oldImgId.name)
        {
            imgSource = Source;
            changeImageName(imgSource, 2);
        }
    }
    else
    {
        imgSource = Source;
        changeImageName(imgSource, 2);
    }
}

function changeAlpha()
{
    hideAll();
    div.style.display = "block";
    changeImageName(oldImgId, 2);
    changeImageName(imgSource, 1);
    oldImgId = imgSource;
    blind_effect_start.start();
}

function changeImageName(target, imgType)
{
    if (imgType == 1)
    {
        if (target.name == "Image22")
        {
            target.src = imageURL + "b11.gif";
        }
        else if (target.name == "Image23")
        {
            target.src = imageURL + "b22.gif";
        }
        else if (target.name == "Image24")
        {
            target.src = imageURL + "b33.gif";
        }
        else if (target.name == "ImageFac1")
        {
            target.src = imageURL + "f11.gif";
        }
        else if (target.name == "Image26")
        {
            target.src = imageURL + "b44.gif";
        }
    }
    else
    {
        if (target.name=="Image22")
        {
            target.src = imageURL+"b1.gif";
        }
        else if (target.name=="Image23")
        {
            target.src = imageURL+"b2.gif";
        }
        else if (target.name=="Image24")
        {
            target.src = imageURL+"b3.gif";
        }
        else if (target.name=="ImageFac1")
        {
            target.src = imageURL+"f1.gif";
        }
        else if (target.name=="Image26")
        {
            target.src = imageURL+"b4.gif";
        }
    }
}

function storeImgId(imgID)
{
    oldImgId = document.getElementById(imgID);
    changeImageName(oldImgId, 1);
}

//function getFlashPlayer(path, width, height, basePath)
//{
//    if(basePath == null)
//        basePath = "";
//        
//    var strflashdata = "";
//    strflashdata += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='" + width +"' height='" + height + "'>";
//    strflashdata += "<param name='movie' value='" + basePath + "FLVPlayer_Progressive.swf' />";
//    strflashdata += "<param name='salign' value='lt' />";
//    strflashdata += "<param name='quality' value='high' />";
//    strflashdata += "<param name='scale' value='noscale' />";
//    strflashdata += "<param name='bgcolor' value='#000000' />";
//    strflashdata += "<param name='wmode' value='transparent' />";
//    strflashdata += "<param name='FlashVars' value='&MM_ComponentVersion=1&skinName=" + basePath + "Corona_Skin_2&streamName=" + path + "&autoPlay=true&autoRewind=false' />";
//    strflashdata += "<embed src='" + basePath + "FLVPlayer_Progressive.swf' bgcolor='#000000' wmode='transparent' flashvars='&MM_ComponentVersion=1&skinName=" + basePath + "Corona_Skin_2&streamName=" + path + "&autoPlay=true&autoRewind=false' quality='high' scale='noscale' width='" + width + "' height='" + height + "' salign='LT' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
//    strflashdata += "</object>";
//    return strflashdata;
//}

//function getMOVPlayer(path, width, height)
//{
//    var strflashdata = "";
//    strflashdata += "<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width='" + width + "' height='" + height + "' codebase='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'>";
//    strflashdata += "<param name='src' value='" + path + "' >";
//    strflashdata += "<param name='controller' value='true' >";
//    strflashdata += "<param name='autoplay' value='true'>";
//    strflashdata += "<param name='loop' value='false'>";
//    strflashdata += "<embed src='" + path + "' width='" + width + "' height='" + height + "' autoplay='true' scale='tofit' loop='false' controller='true' type='video/quicktime' pluginspage='http://www.apple.com/quicktime/download/'></embed>";
//    strflashdata += "</object>";
//    // strflashdata += "<embed src='" + path + "' width='" + width + "' height='" + height +"' autoplay='true' scale='tofit' loop='false' controller='true' type='video/quicktime' pluginspage='http://www.apple.com/quicktime/download/' showstatusbar='1'></embed>";
//    return strflashdata;
//}
//-->