﻿function pdrk_UL_GC(id)
{
	if (document.getElementById("gn_"+id))
		document.getElementById("gn_"+id).style.textDecoration='underline';
	if (document.getElementById("gt_"+id))
		document.getElementById("gt_"+id).style.textDecoration='underline';
		
}
function pdrk_deUL_GC(id)
{
	if (document.getElementById("gn_"+id))
		document.getElementById("gn_"+id).style.textDecoration='none';
	if (document.getElementById("gt_"+id))
		document.getElementById("gt_"+id).style.textDecoration='none';
		
}
function hl_btn(i)
{
    i.style.backgroundPosition='bottom';
}

function un_hl_btn(i)
{
    i.style.backgroundPosition='top';
}

function check_for_number(obj)
{
 str=obj.value;

 var rep = /[^\d]/g;
 obj.value=(str.replace(rep, ""));
}
function MakeVisible(obj)
{
    if (document.getElementById(obj)) 
        
        {
        
            document.getElementById(obj).style.visibility="visible";
           /* document.getElementById(obj).style.display="block";*/
        }
            

}
function MakeInVisible(obj)
{
    if (document.getElementById(obj)) 
        
        {
            document.getElementById(obj).style.visibility="hidden";
           /* document.getElementById(obj).style.display="none";*/
        }
            

}
function pdrk_UL_GC(id)
{
	if (document.getElementById("gn_"+id))
		document.getElementById("gn_"+id).style.textDecoration='underline';
	if (document.getElementById("gt_"+id))
		document.getElementById("gt_"+id).style.textDecoration='underline';
		
}
function pdrk_deUL_GC(id)
{
	if (document.getElementById("gn_"+id))
		document.getElementById("gn_"+id).style.textDecoration='none';
	if (document.getElementById("gt_"+id))
		document.getElementById("gt_"+id).style.textDecoration='none';
		
}
function hl_btn(i)
{
    i.style.backgroundPosition='bottom';
}

function un_hl_btn(i)
{
    i.style.backgroundPosition='top';
}

function check_for_number(obj)
{
 str=obj.value;

 var rep = /[^\d]/g;
 obj.value=(str.replace(rep, ""));
}
function MakeVisible(obj)
{
    if (document.getElementById(obj)) 
        
        {
        
            document.getElementById(obj).style.visibility="visible";
           /* document.getElementById(obj).style.display="block";*/
        }
            

}
function MakeInVisible(obj)
{
    if (document.getElementById(obj)) 
        
        {
            document.getElementById(obj).style.visibility="hidden";
           /* document.getElementById(obj).style.display="none";*/
        }
            

}

function ATB_QHide_0()
{
    MakeVisible('atb_sc'); 
    document.getElementById('atb_code').style.display='none';
    MakeInVisible('atb_code');
}
function GenATB_flash(textareaid,title,goodname,iconurl,imageurl,goodhref)
{
    if (document.getElementById(textareaid))
    {
        document.getElementById(textareaid).value='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="348" height="168" id="348x168" align="middle">'+
        '<param name="allowScriptAccess" value="sameDomain" />'+
        '<param name="movie" value="http://podarki.ru/media/podarki.ru.wanted.swf?var_gpic='+imageurl+'&var_icon='+iconurl+'&var_gn='+goodname+'&var_gwf='+title+'&var_glink='+goodhref+'" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />'+
        '<embed src="http://podarki.ru/media/podarki.ru.wanted.swf?var_gpic='+imageurl+'&var_icon='+iconurl+'&var_gn='+goodname+'&var_gwf='+title+'&var_glink='+goodhref+'" loop="false" quality="high" bgcolor="#ffffff" width="348" height="168" name="348x168" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ></embed>'+
        '</object>';
        
      
	    try
        {
            document.getElementById(textareaid).select();
        }
        catch(ex){}
    }
}