﻿//elementID: hold tag id for menu functions on the "over.htc" file
elementID = "";

// array and count for do reka tables - that in bottom.js is made
rekaArrey = new Array();
rekaAcount = 0;

function doRekaGal(tdid)
{
    //alert ( 'Browser Name is' + navigator.appName);
    if (navigator.appName != 'Microsoft Internet Explorer')
    {
    document.getElementById(tdid).style.background = 'White';
    }
}

function doRekaGalTable(tableid,aboutRekaTextTD1)
{

if (navigator.appName == 'Microsoft Internet Explorer')
    {
    document.getElementById(tableid).style.height = '100%';
    }
    else{
    document.getElementById(tableid).style.height = '50%';
    document.getElementById(aboutRekaTextTD1).style.background = 'White';
    document.getElementById(aboutRekaTextTD1).style.border = '1px solid black';
    }
}

function doFlash(tdid, width, height, theSWF)
{
//  document.getElementById(tdid).innerHTML = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' width=" + width + " height=" + height + ">"+
//  "<param name=movie value='" + theSWF + "' />"+
//  "<param name=wmode value=transparent />"+
//  "</object>";
  
  document.getElementById(tdid).innerHTML = "<object  data=\"" + theSWF + "\" type=\"application/x-shockwave-flash\" id=\"myflash\" width=\"" + width + "\" height=\"" + height + "\">"+
    "<param name=\"movie\" value=\"" + theSWF + "\" />"+
    "<param name=\"bgcolor\" value=\"#ffffff\" />"+
    "<param name=\"height\" value=\"" + height + "\" />"+
    "<param name=\"width\" value=\"" + width + "\" />"+
    "<param name=\"quality\" value=\"high\" />"+
    "<param name=\"allowscriptaccess\" value=\"samedomain\" />"+
    "<param name=\"wmode\" value=\"transparent\" />"+
    "</object>";
}

function flashReka(tdid, width, height, theSWF)
{
//  document.getElementById(tdid).innerHTML = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' width=" + width + " height=" + height + ">"+
//  "<param name=movie value='" + theSWF + "' />"+
//  "<param name='scale' value='noscale' />"+
//  "<param name='salign' value='lt' />"+
//  "<param name=wmode value=transparent />"+
//  "</object>";
  
  document.getElementById(tdid).innerHTML = "<object  data=\"" + theSWF + "\" type=\"application/x-shockwave-flash\" id=\"myflash\" width=\"" + width + "\" height=\"" + height + "\">"+
    "<param name=\"movie\" value=\"" + theSWF + "\" />"+
    "<param name=\"height\" value=\"" + height + "\" />"+
    "<param name=\"width\" value=\"" + width + "\" />"+
    "<param name=\"quality\" value=\"high\" />"+
    "<param name=\"allowscriptaccess\" value=\"samedomain\" />"+
    "<param name=\"wmode\" value=\"transparent\" />"+
    "<param name=\"scale\" value=\"noscale\" />"+
  "<param name=\"salign\" value=\"lt\" />"+
    "</object>";
  
  
}

function loadFlashReka(tdid, tdSizeID, isHeight, isWidth)
{  
    if(isHeight==0)
    {
        theHeight = parseInt(document.getElementById(tdSizeID).offsetHeight);
    }
    else
    {
        theHeight = isHeight;
    }
    
    if(isWidth==0)
    {
        theWidth = parseInt(document.getElementById(tdSizeID).offsetWidth); 
    }
    else
    {
        theWidth = isWidth;
    }
 
//    document.getElementById(tdid).innerHTML = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' width=" + theWidth + " height=" + theHeight + ">"+
//    "<param name=movie value='flash/roundBack.swf?theW=" + (theWidth-2) + "&theH=" + (theHeight-2) + "&lineC=0x" + color5 + "&rekaC=0x" + color12 + "&tran=90&tranL=60&round=" + round + "&lineW=1' />"+
//    "<param name='scale' value='noscale' />"+
//    "<param name='salign' value='lt' />"+
//    "<param name=wmode value=transparent />"+
//    "</object>";  
    
    document.getElementById(tdid).innerHTML = "<object  type=\"application/x-shockwave-flash\" id=\"myflash\" width=\"" + theWidth + "\" height=\"" + theHeight + "\">"+
   "<param name=movie value=\"flash/roundBack.swf?theW=\"" + (theWidth-2) + "\"&theH=\"" + (theHeight-2) + "\"&lineC=0x\"" + color5 + "\"&rekaC=0x\"" + color12 + "\"&tran=90&tranL=60&round=\"" + round + "\"&lineW=1\" />"+
    "<param name=\"wmode\" value=\"transparent\" />"+
    "<param name=\"height\" value=\"" + theHeight + "\" />"+
    "<param name=\"width\" value=\"" + theWidth + "\" />"+
    "<param name=\"scale\" value=\"noscale\" />"+
    "<param name=\"salign\" value=\"lt\" />"+
    "<param name=\"wmode\" value=\"transparent\" />"+
    "</object>";
}

function getWL(uk, tid, theTarget)
{
    var xmlHttp;
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    if (xmlHttp)
    {
	    xmlHttp.open("GET","urlGive.aspx?uk=" + uk + "&tid=" + tid, false);
	    xmlHttp.send();
	    xmlHttp.close;
	    
	    if (xmlHttp.responseText != "no")
        {
            doLw(xmlHttp.responseText,theTarget)
        }
    }
}

function doLw(WU,theTarget)
{
	linkUwL.href = WU;
	if(theTarget == "1")
	{
	    linkUwL.target="_blank";
	}
	else
	{
	    linkUwL.target="_top";
	}
	linkUwL.click();
}

