﻿function wordwrap(parString,parCharAmount)
{
    html = "";
    pointer = 0;
    index = -1;
    TotalCharAmount = parString.length;
    while (pointer < TotalCharAmount )
    {
        index = (parString.substring(pointer,parCharAmount+pointer)).indexOf(' ');
        if(index != -1 || parString.substring(pointer,parCharAmount+pointer).length != parCharAmount)                
        {
            if(parString.substring(pointer,parCharAmount+pointer).length != parCharAmount)
            {
                html += parString.substring(pointer,parCharAmount+pointer);
                pointer = TotalCharAmount;
            }
            else
            {
                html += parString.substring(pointer,index+1+pointer);
                pointer = pointer+index+1;
            }
        }
        else
        {
            html+= "<div style='margin: 0px 0px 0px 0px;padding:0px 0px 0px 0px'>";
            html+= parString.substring(pointer,parCharAmount+pointer);
            html += "</div>";
            pointer = pointer+parCharAmount;
        }
    }
    return html;
}


function getYCoordinateOfElement( oElement )
{
    var iReturnValue = 0;
    while( oElement != null ) 
    {
        iReturnValue += oElement.offsetTop;
        oElement = oElement.offsetParent;
    }
    return iReturnValue;
}


function getXCoordinateOfElement( oElement )
{
    var iReturnValue = 0;
    while( oElement != null ) 
    {
        iReturnValue += oElement.offsetLeft;
        oElement = oElement.offsetParent;
    }
    return iReturnValue;
  
}



function validateNumericBox(event)
{
    var result = true;
    if (!e) var e = event;

    if (e.keyCode != 9 && !(e.keyCode>=48 && e.keyCode<=57))
	{
		result= false;
	}
	if(e.keyCode == 9 || (e.keyCode>=96 && e.keyCode<=105))
	    result = true;
	if(e.keyCode  == 8)
	    result = true;
	   
	return result;
}
function validateNumericBoxObject(object)
{
    if(object)
    {
        if(CheckDecimal(object.value) == false)
        {
            object.value = "";
        }
    }
}

String.prototype.trim = function()
{
    a = this.replace(/^\s+/, '');
    return a.replace(/\s+$/, '');
};

function CheckObjectMaxFieldSize(obj,maxsize,objcharcountid)
{
    if(obj)
    {
        var limitcharcount = 0;
        var objcharcount = document.getElementById(objcharcountid);
        if(parseInt(obj.value.length)<parseInt(maxsize))
        {
            limitcharcount = parseInt(maxsize) - parseInt(obj.value.length);
        }
        else
        {
            limitcharcount = 0;
            obj.value = obj.value.substring(0,maxsize);
        }
        if(objcharcount)
        {
            objcharcount.innerHTML = limitcharcount;
        }
    }
}


function isValidEmail(email)
{
	var filter = new RegExp("^([\\w-]+(?:\\.[\\w-]+)*)@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([a-z]{2,6}(?:\\.[a-z]{2})?)$", "i")
				
	if (filter.test(email))
		return true
	else
		return false
}

function isValidNumeric(strString)   
{
    var strValidChars = "0123456789";
    var strChar;
    var blnResult = true;

    if (strString.length == 0) return false;


    for (i = 0; i < strString.length && blnResult == true; i++)
    {
        strChar = strString.charAt(i);
        if (strValidChars.indexOf(strChar) == -1)
        {
            blnResult = false;
        }
    }
    return blnResult;
}

function isNumericAllowNull(Component)   
{

    strString = Component.value;
    if(strString.trim() == "")
        return true;
    var strValidChars = "0123456789";
    var strChar;
    var blnResult = true;

    if (strString.length == 0) return false;


    for (i = 0; i < strString.length && blnResult == true; i++)
    {
        strChar = strString.charAt(i);
        if (strValidChars.indexOf(strChar) == -1)
        {
            blnResult = false;
        }
    }
    return blnResult;
}

function isNumericAllowNotNull(Component)   
{
    strString = Component.value;
    var strValidChars = "0123456789";
    var strChar;
    var blnResult = true;

    if (strString.length == 0) return false;


    for (i = 0; i < strString.length && blnResult == true; i++)
    {
        strChar = strString.charAt(i);
        if (strValidChars.indexOf(strChar) == -1)
        {
            blnResult = false;
        }
    }
    return blnResult;
}

function isEmpty(strString)
{
    if(strString.trim() == "")
        return true;
    else
        return false;
}

function isComponentHasValue(Component)
{
    var v = Component.value.trim();
    if(v == "")
      return false;
    return true;
}

function GetIndexOfOptionByValue(Component,Value)
{
    if(Component != null)
    {
        
        for(i = 0; i < Component.options.length;i++ )
        {
            if(Component.options[i].value == Value)
                return i;
        }
    
    }
    return 0;
}
function CheckMoney(obj,message)
{
    if(!IsNumericAllowNotNull(obj))
    {        
        alert(message);
        obj.value = '';
    }
}

function DisplayOrHideObject(obj)
{
    if(obj.style.display == 'none')
    {
        obj.style.display = 'block';
    }
    else
    {
        obj.style.display = 'none';
    }
}

var timerWaitForToHide;
var currentHideObj;
function WaitForToHide(obj,time)
{
    if(obj != null)
    {
        currentHideObj = obj;
        timerWaitForToHide = setTimeout('WaitForToHide(null,0)',time);
    }
    else
    {
        currentHideObj.style.display='none';
        clearTimeout(timerWaitForToHide);
    }
}
function AjaxMessageShower(display,message)
{
    var ajxDiv = document.getElementById('ajxmsg');
    var ajxMessageSpan = document.getElementById('ajxmsgMessage');
    if(ajxMessageSpan)
        ajxMessageSpan.innerText = message;
    if(display)
        $.blockUI('<img src="D/i/loading.gif" />'); 
        //ajxDiv.style.display = 'block';
    else
        $.unblockUI();
        //ajxDiv.style.display = 'none';
}

/**

Contructor(s):
 Hashtable()
          Creates a new, empty hashtable

Method(s):
 void clear() 
          Clears this hashtable so that it contains no keys. 
 boolean containsKey(String key) 
          Tests if the specified object is a key in this hashtable. 
 boolean containsValue(Object value) 
          Returns true if this Hashtable maps one or more keys to this value. 
 Object get(String key) 
          Returns the value to which the specified key is mapped in this hashtable. 
 boolean isEmpty() 
          Tests if this hashtable maps no keys to values. 
 Array keys() 
          Returns an array of the keys in this hashtable. 
 void put(String key, Object value) 
          Maps the specified key to the specified value in this hashtable. A NullPointerException is thrown is the key or value is null.
 Object remove(String key) 
          Removes the key (and its corresponding value) from this hashtable. Returns the value of the key that was removed
 int size() 
          Returns the number of keys in this hashtable. 
 String toString() 
          Returns a string representation of this Hashtable object in the form of a set of entries, enclosed in braces and separated by the ASCII characters ", " (comma and space). 
 Array values() 
          Returns a array view of the values contained in this Hashtable. 
 Array entrySet()
          Returns a reference to the internal array that stores the data. The Set is backed by the Hashtable, so changes to the Hashtable are reflected in the Set, and vice-versa.
        
*/
function Hashtable(){
this.hashtable = new Array();
}

/* privileged functions */

Hashtable.prototype.clear = function(){
this.hashtable = new Array();
}              
Hashtable.prototype.containsKey = function(key){
var exists = false;
for (var i in this.hashtable) {
    if (i == key && this.hashtable[i] != null) {
        exists = true;
        break;
    }       
}
return exists;
}
Hashtable.prototype.containsValue = function(value){
var contains = false;
if (value != null) {
    for (var i in this.hashtable) {
        if (this.hashtable[i] == value) {
            contains = true;
            break;
        }
    }
}        
return contains;
}
Hashtable.prototype.get = function(key){
return this.hashtable[key];
}
Hashtable.prototype.isEmpty = function(){
return (parseInt(this.size()) == 0) ? true : false;
}
Hashtable.prototype.keys = function(){
var keys = new Array();
for (var i in this.hashtable) {
    if (this.hashtable[i] != null)
        keys.push(i);
}
return keys;
}
Hashtable.prototype.put = function(key, value){
if (key == null || value == null) {
    throw "NullPointerException {" + key + "},{" + value + "}";
}else{
    this.hashtable[key] = value;
}
}
Hashtable.prototype.remove = function(key){
var rtn = this.hashtable[key];
this.hashtable[key] = null;
return rtn;
}    
Hashtable.prototype.size = function(){
var size = 0;
for (var i in this.hashtable) {
    if (this.hashtable[i] != null)
        size ++;
}
return size;
}
Hashtable.prototype.toString = function(){
var result = "";
for (var i in this.hashtable)
{     
    if (this.hashtable[i] != null)
        result += "{" + i + "},{" + this.hashtable[i] + "}\n";  
}
return result;
}                                  
Hashtable.prototype.values = function(){
var values = new Array();
for (var i in this.hashtable) {
    if (this.hashtable[i] != null)
        values.push(this.hashtable[i]);
}
return values;
}                                  
Hashtable.prototype.entrySet = function(){
return this.hashtable;
}

//----------------------------------------------------------------------------------------------------------------------------------------------
function GetKeysWhereClause(ht,value)
{
    var _keys = ht.keys();
    var result = new Array();
    var cnt = 0;
    for(i=0;i<_keys.length;i++)
    {
        var v = ht.get(_keys[i]);
        if( v == value)
        {
            result[cnt] = _keys[i];
            cnt++;
        }
    }
    return result;
}
function FillCombo(sourceidfull,sourceid,optionvalues,optionparentoptions,optionpropertyids,propertyparentpropertyids,propertydefaultvalues,globallables)
{
    var val = document.getElementById(sourceidfull+sourceid).value;
    if(val == "")
    {
        SetDefaultToChildren(sourceidfull,sourceid,propertyparentpropertyids,propertydefaultvalues)
        return;
    }
    
    var parsedArray = GetKeysWhereClause(optionparentoptions,val);
    
    var destinationID = GetKeysWhereClause(propertyparentpropertyids,sourceid);
    if(destinationID.length ==1)
    {
        SetDefaultToChildren(sourceidfull,sourceid,propertyparentpropertyids,propertydefaultvalues);
    
        var destination = document.getElementById(sourceidfull+destinationID[0]);
        clearGivenSelected(destination);
        destination.options[0] = new Option(globallables.get('Seciniz'),'');
        for(i=0;i<parsedArray.length;i++)
        {
            destination.options[i+1] = new Option(optionvalues.get(parsedArray[i]),parsedArray[i]);

        }
    }
}
function FillListBox(sourceidfull,sourceid,optionvalues,optionparentoptions,optionpropertyids,propertyparentpropertyids,propertydefaultvalues,globallables)
{
    var val = document.getElementById(sourceidfull+sourceid).value;
    if(val == "")
    {
        SetDefaultToChildren(sourceidfull,sourceid,propertyparentpropertyids,propertydefaultvalues)
        return;
    }
    
    var parsedArray = GetKeysWhereClause(optionparentoptions,val);
    
    var destinationID = GetKeysWhereClause(propertyparentpropertyids,sourceid);
    if(destinationID.length ==1)
    {
        SetDefaultToChildren(sourceidfull,sourceid,propertyparentpropertyids,propertydefaultvalues);
    
        var destination = document.getElementById(sourceidfull+destinationID[0]);
        clearGivenSelected(destination);
        destination.options[0] = new Option('','');
        for(i=0;i<parsedArray.length;i++)
        {
            destination.options[i+1] = new Option(optionvalues.get(parsedArray[i]),parsedArray[i]);

        }
    }
}
function clearGivenSelected(sel)
{
    while(sel.options.length)
        sel.remove(0);
}
function clearGivenSelected(sel,text)
{
    while(sel.options.length)
        sel.remove(0);
    sel.options[0] = new Option(text,'');
}
function ClearCombo(combo,startIndex)
{
    while(combo.options.length>startIndex)
        combo.remove(startIndex);
}
function SetDefaultToChildren(sourceidfull,sourceid,propertyparentpropertyids,propertydefaultvalues)
{
        var ClearArray;
        ClearArray = GetKeysWhereClause(propertyparentpropertyids,sourceid);
        var PropertyIDHolder = "";
        while(ClearArray.length > 0)
        {
            destcombo = document.getElementById(sourceidfull+ClearArray[0]);
            
            if(destcombo != null)
            {
                clearGivenSelected(destcombo,propertydefaultvalues.get(ClearArray[0]));
                destcombo = null;
                PropertyIDHolder = ClearArray[0];
            }
            ClearArray = GetKeysWhereClause(propertyparentpropertyids,PropertyIDHolder);
        }
}
function StartsWith(sText,TextSearch)
{
    if(sText == "undefined")
        return false;
    if(sText == null)
        return false;
    if(sText.trim() == "")
        return false;
    if(TextSearch.trim() == "")
        return false;
    var temp = "";
    for(i = 0;i<TextSearch.length;i++)
    {
        if(sText.indexOf(TextSearch.charAt(i)) != -1)
        {
            temp += sText.charAt(i);
        }        
    }
    if(temp == TextSearch)
    {
    return true;
    }
    return false;
}
function GetCurrentURLQueryString(currentURL)
{
    var addurl = "";
        if(currentURL.indexOf("?") != -1)
        {
            var lg = currentURL.length;
            i = currentURL.indexOf("?");
            currentURL = currentURL.substring(i,currentURL.length);
            if(currentURL.indexOf("?componentID") != -1)
            {
                var j = -1;
                if(currentURL.indexOf("&") != -1)
                {
                    j = currentURL.indexOf("&");
                }
                if(j != -1)
                   currentURL = currentURL.substring(i+1,j);
            }
            else
            {
                i = currentURL.indexOf("?");
                currentURL = currentURL.substring(i+1,currentURL.length);
            }
            addurl = "&" + currentURL;
        }   
       return addurl;
}

function GetExtension(path)
{
    var Arr = path.split(".");
    if(Arr != null && Arr.length >0)
    {   
        return Arr[Arr.length-1];
    }
    return "";
}
function ShowErrorHighlight(msg,pointElement,errorMessageElement)
{
      var con = errorMessageElement;
      if(con)
      {
        try
        {
            con.style.display = "block";      
            con.innerHTML = '<br/>'+msg+'<br/>&nbsp;';
            $(con).highlightFade('red');
            WaitForToHide(con,10000);
        }
        catch(ex)
        {
        }
      }
      $(pointElement).highlightFade('red');
}
function ShowErrorHighlightWithOutBr(msg,pointElement,errorMessageElement)
{
      var con = errorMessageElement;
      con.style.display = "block";      
      con.innerHTML = msg;
      $(con).highlightFade('red');
      $(pointElement).highlightFade('red');
      WaitForToHide(con,10000);
}
//Custom AJAX object///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function getXmlInstance()
{
   var retval=null;
   try
   {
      retval=new ActiveXObject("Msxml2.XMLHTTP");
   }
   catch(e)
   {
      try
      {
        retval=new ActiveXObject("Microsoft.XMLHTTP");
      } 
      catch(oc)
      {
        retval=null;
      }
  }
  if(!retval && typeof XMLHttpRequest != "undefined") 
  {
     retval=new XMLHttpRequest();
  }
 return retval;
}
//Global Variables
var lblBindedContainerID;
var currentxmlhttp = null;
var isAjaxFinish = true;
var MID = null;
var hasrefresh = null;
var CURL = null;
var LoadingMessage = null;
function callComponentLoad(lblConID,url,isasync,parLoadingMessage,lblGroup)
{
    LoadingMessage = parLoadingMessage;
    lblBindedContainerID = lblConID;
    currentxmlhttp= getXmlInstance();
    if (currentxmlhttp!=null)
    {
        try
        {   
            $.get(url,
            function(resp)
            {
               try
               {    
                    document.getElementById(lblBindedContainerID).innerHTML =resp;  
                    if(document.getElementById('lblgrp_1') && lblGroup != null)
                        document.getElementById('lblgrp_1').value = lblGroup;
               }
               catch(ex)
               {
                    alert(ex.message);
               }
            },
            false);
        }
        catch(ex)
        {
            alert(ex.message);
        }
    }
    else
    {
        alert("Web Tarayıcınızın Bazı Güncellemeleri Yapılmadığı İçin Web Sitemizi Sorunsuz Bir Şekilde İnceleyemeyeceksiniz. Lütfen Web Tarayıcınızı Güncelleyeniz ve/veya Modern Web Tarayıcılarından (Internet Explorer, Firefox, Opera) Bir Tanesini Tercih Ediniz. ")
    }
}
//aseny. metot for changemodule
function state_Change()
{
    if(currentxmlhttp != null)
    {
        if(currentxmlhttp.readyState==1)
        {   
            AjaxMessageShower(true,LoadingMessage)
            isAjaxFinish = false;
        }
        // if xmlhttp shows "loaded"
        if (currentxmlhttp.readyState==4)
        {
            AjaxMessageShower(false,LoadingMessage)
            isAjaxFinish = true;
            // if "OK"
            if (currentxmlhttp.status==200)
            {
               try
               {    
                   document.getElementById(lblBindedContainerID).innerHTML =currentxmlhttp.responseText;
               }
               catch(ex)
               {
                    alert(ex.message);
               }

            }
            else
            {
                document.getElementById(lblBindedContainerID).innerHTML ="<a>Tekrar Deneyiniz.</a>";
                alert("İsteğiniz Başarılı İle Sonlandırılamadı. Lütfen Tekrar Deneyiniz.");
            }
        }
    }
}

function OpenPopUpWindow(url, width, height)
{
    window.open (url,"mywindow","location=no,statusbar=no,scrollbar=no,toolbar=no,menubar=no,width="+width+",height="+height);
} 
//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

function hideCurrentComponent(CurrentModuleID)
{
  var currentComponentContainer = document.getElementById('componentID_' + CurrentModuleID);
  if(currentComponentContainer)
  {
    currentComponentContainer.style.display = 'none';
  }
}
function clearCurrentContainerHtml(CurrentModuleID)
{
  var currentComponentContainer = document.getElementById('componentID_' + CurrentModuleID);
  if(currentComponentContainer)
  {
    currentComponentContainer.innerHTML= '';
  }
}



/**
 * FlashObject v1.2.3: Flash detection and embed - http://blog.deconcept.com/flashobject/
 *
 * FlashObject is (c) 2005 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof com == "undefined") var com = new Object();
if(typeof com.deconcept == "undefined") com.deconcept = new Object();
if(typeof com.deconcept.util == "undefined") com.deconcept.util = new Object();
if(typeof com.deconcept.FlashObjectUtil == "undefined") com.deconcept.FlashObjectUtil = new Object();
com.deconcept.FlashObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, redirectUrl, detectKey){
   this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
   this.skipDetect = com.deconcept.util.getRequestParameter(this.DETECT_KEY);
   this.params = new Object();
   this.variables = new Object();
   this.attributes = new Array();

   if(swf) this.setAttribute('swf', swf);
   if(id) this.setAttribute('id', id);
   if(w) this.setAttribute('width', w);
   if(h) this.setAttribute('height', h);
   if(ver) this.setAttribute('version', new com.deconcept.PlayerVersion(ver.toString().split(".")));
   if(c) this.addParam('bgcolor', c);
   var q = quality ? quality : 'high';
   this.addParam('quality', q);
   this.setAttribute('redirectUrl', '');
   if(redirectUrl) this.setAttribute('redirectUrl', redirectUrl);
   if(useExpressInstall) {
   // check to see if we need to do an express install
   var expressInstallReqVer = new com.deconcept.PlayerVersion([6,0,65]);
   var installedVer = com.deconcept.FlashObjectUtil.getPlayerVersion();
      if (installedVer.versionIsValid(expressInstallReqVer) && !installedVer.versionIsValid(this.getAttribute('version'))) {
         this.setAttribute('doExpressInstall', true);
      }
   } else {
      this.setAttribute('doExpressInstall', false);
   }
}
com.deconcept.FlashObject.prototype.setAttribute = function(name, value){
	this.attributes[name] = value;
}
com.deconcept.FlashObject.prototype.getAttribute = function(name){
	return this.attributes[name];
}
com.deconcept.FlashObject.prototype.getAttributes = function(){
	return this.attributes;
}
com.deconcept.FlashObject.prototype.addParam = function(name, value){
	this.params[name] = value;
}
com.deconcept.FlashObject.prototype.getParams = function(){
	return this.params;
}
com.deconcept.FlashObject.prototype.getParam = function(name){
	return this.params[name];
}
com.deconcept.FlashObject.prototype.addVariable = function(name, value){
	this.variables[name] = value;
}
com.deconcept.FlashObject.prototype.getVariable = function(name){
	return this.variables[name];
}
com.deconcept.FlashObject.prototype.getVariables = function(){
	return this.variables;
}
com.deconcept.FlashObject.prototype.getParamTags = function(){
   var paramTags = ""; var key; var params = this.getParams();
   for(key in params) {
        paramTags += '<param name="' + key + '" value="' + params[key] + '" />';
    }
   return paramTags;
}
com.deconcept.FlashObject.prototype.getVariablePairs = function(){
	var variablePairs = new Array();
	var key;
	var variables = this.getVariables();
	for(key in variables){
		variablePairs.push(key +"="+ variables[key]);
	}
	return variablePairs;
}
com.deconcept.FlashObject.prototype.getHTML = function() {
    var flashHTML = "";
    if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
        if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
        flashHTML += '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" id="'+ this.getAttribute('id') + '" name="'+ this.getAttribute('id') +'"';
		var params = this.getParams();
        for(var key in params){ flashHTML += ' '+ key +'="'+ params[key] +'"'; }
		pairs = this.getVariablePairs().join("&");
        if (pairs.length > 0){ flashHTML += ' flashvars="'+ pairs +'"'; }
        flashHTML += '></embed>';
    } else { // PC IE
        if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
        flashHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" id="'+ this.getAttribute('id') +'">';
        flashHTML += '<param name="movie" value="' + this.getAttribute('swf') + '" />';
		var tags = this.getParamTags();
        if(tags.length > 0){ flashHTML += tags; }
		var pairs = this.getVariablePairs().join("&");
        if(pairs.length > 0){ flashHTML += '<param name="flashvars" value="'+ pairs +'" />'; }
        flashHTML += '</object>';
    }
    return flashHTML;
}
com.deconcept.FlashObject.prototype.write = function(elementId){
	if(this.skipDetect || this.getAttribute('doExpressInstall') || com.deconcept.FlashObjectUtil.getPlayerVersion().versionIsValid(this.getAttribute('version'))){
		if(document.getElementById){
		   if (this.getAttribute('doExpressInstall')) {
		      this.addVariable("MMredirectURL", escape(window.location));
		      document.title = document.title.slice(0, 47) + " - Flash Player Installation";
		      this.addVariable("MMdoctitle", document.title);
		   }
			document.getElementById(elementId).innerHTML = this.getHTML();
		}
	}else{
		if(this.getAttribute('redirectUrl') != "") {
			document.location.replace(this.getAttribute('redirectUrl'));
		}
	}
}
/* ---- detection functions ---- */
com.deconcept.FlashObjectUtil.getPlayerVersion = function(){
   var PlayerVersion = new com.deconcept.PlayerVersion(0,0,0);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new com.deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else if (window.ActiveXObject){
	   try {
   	   var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
   		PlayerVersion = new com.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
	   } catch (e) {}
	}
	return PlayerVersion;
}
com.deconcept.PlayerVersion = function(arrVersion){
	this.major = parseInt(arrVersion[0]) || 0;
	this.minor = parseInt(arrVersion[1]) || 0;
	this.rev = parseInt(arrVersion[2]) || 0;
}
com.deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
com.deconcept.util.getRequestParameter = function(param){
	var q = document.location.search || document.location.href.hash;
	if(q){
		var startIndex = q.indexOf(param +"=");
		var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length;
		if (q.length > 1 && startIndex > -1) {
			return q.substring(q.indexOf("=", startIndex)+1, endIndex);
		}
	}
	return "";
}

/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use / backwards compatibility */
var getQueryParamValue = com.deconcept.util.getRequestParameter;
var FlashObject = com.deconcept.FlashObject;

//*************************************************************************
function LoadComponent(componentID,parameters)
{
    var xmlHttp = null;
    // Mozilla, Opera, Safari & Internet Explorer 7
    if (typeof XMLHttpRequest != 'undefined')
    {
        xmlHttp = new XMLHttpRequest();
    }
    if (!xmlHttp)
    {
        // Internet Explorer 6
        try
        {
            xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e)
        {
            try
            {
                xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch(e)
            {
                xmlHttp  = null;
            }
        }
    }
    
    xmlHttp.open("GET", "Common/Component.aspx?COMPONENTID="+componentID+"&"+parameters, true);
    xmlHttp.onreadystatechange = function ()
        {
            if (xmlHttp.readyState == 4)
            {
                if (xmlHttp.status == "200")
                {
                    document.getElementById("componentID_"+componentID).innerHTML = xmlHttp.responseText;
                }
            }
        };
  	xmlHttp.send("");
}
