﻿var bIsIE = false;	
if(navigator.userAgent.toLowerCase().indexOf("msie") != -1)
{
	bIsIE = true;
}

function openLink(href, width, height, scroll, title)
{
    if(typeof(title) != 'string') title = "";
    scroll = typeof(scroll) == 'boolean' ? (scroll ? "yes" : "no") : (typeof(scroll) == 'string' ? scroll : "no");
    window.open (href, title,"top=200,left=300,width=" + width + ",height=" + height + ",resizable=no,scrollbars=" + scroll).focus();            
    return false;
}
function EmbededVideoProc (sPlayerContentID, sDescriptionContentID)
{
    this.descriptionContentID = sDescriptionContentID;
    this.playerContentID = sPlayerContentID;
    
    this.play = function (htmlVideoObject, htmlVideoDescription)
    {
        document.getElementById(this.playerContentID).innerHTML = htmlVideoObject;
        document.getElementById(this.descriptionContentID).innerHTML = htmlVideoDescription;    
    }
}
function _attachEventToElement(element, eventName, func) 
 {
      if(!bIsIE)
           element.addEventListener(eventName, func, true);
      else 
      {
           if(eventName.toLowerCase().indexOf("on") != 0) 
                eventName = "on"+eventName;
           element.attachEvent(eventName, func);
      }
}
function CommonFunctions(){}
//----------------------------------------------------------------------------------------------------------------------------------------------
CommonFunctions.g_gvh = String.fromCharCode(64);
CommonFunctions.g_prev = "mai" + "" + "lto:";
CommonFunctions.g_satr = "h" + "" + "ref";
CommonFunctions.g_mainValue2 = "pixe" + "l" + "fish";
CommonFunctions.g_mainValue3 = "com";
CommonFunctions.getGav = function(sValue1, sValue2, sValue3, bAddPrev)
{
    if(typeof(bAddPrev) != "boolean")bAddPrev = true;
    var ret1 = sValue1 + CommonFunctions.g_gvh;
    var ret2 = "." + sValue3;
    return (bAddPrev ? CommonFunctions.g_prev : "") + ret1 + sValue2 + ret2;
}
CommonFunctions.putGav = function(obj, sValue1, sValue2, sValue3, bWithInnerText)
{
    obj.setAttribute(CommonFunctions.g_satr, CommonFunctions.getGav(sValue1, sValue2, sValue3));
    if(typeof(bWithInnerText) == 'boolean' && bWithInnerText)
        obj.innerHTML = CommonFunctions.getGav(sValue1, sValue2, sValue3, false);
}
CommonFunctions.putMainGav = function(obj, sValue, bWithInnerText)
{
    CommonFunctions.putGav(obj, sValue, CommonFunctions.g_mainValue2, CommonFunctions.g_mainValue3, bWithInnerText);
}
//----------------------------------------------------------------------------------------------------------------------------------------------