function set_ppd_2(arr)
{
	tb=document.getElementById('tr2');
	var len=tb.rows.length;
	var alen=arr.length;
	for(var i=0;i<alen;i++ )
	{
		//p=0;
//		if(i==1 && len>=2)
//		{
//			p=3;
//		}
//		else if(i==1 && len<2)
//		{
//			p=tb.rows.length;
//		}
//		else if(i==2 && len >=4)
//		{
//			p=6;
//		}
//		else if(i==2 && len < 4)
//		{
//			p=tb.rows.length;
//		}
		newRow=tb.insertRow(i);
		newRow.onmouseover=function(){this.style.background='#f8fee2';};
		newRow.onmouseout=function(){this.style.background='';};
		newCell=newRow.insertCell(0);
		newCell.colSpan=4;
		newCell.style.paddingTop='0px';
		newCell.style.paddingBottom='0px';
		newCell.innerHTML=arr[i];
	}	
}
if(typeof(page) != 'string'){
	//ppdShow(1);
}


function getPage()
{
	var url=window.location.href;
	if(url)
	{	
		uarr=url.split('?');
		if(uarr[1])
		{
			return parseInt(uarr[1]);
		}
		else
		{
			return 1;
		}
	}
	else
	{
		return 1;
	}
}
function ppdShow(i)
{
	window.location='bs2.html?'+i;
}
//Asynchronous loading js
var MiniSite=new Object();
MiniSite.Browser={
    ie:/msie/.test(window.navigator.userAgent.toLowerCase()),
    moz:/gecko/.test(window.navigator.userAgent.toLowerCase()),
    opera:/opera/.test(window.navigator.userAgent.toLowerCase()),
    safari:/safari/.test(window.navigator.userAgent.toLowerCase())
};


function addjs(obj)
{
	document.getElementsByTagName('body')[0].appendChild(obj);
}
MiniSite.JsLoader={
    load:function(sUrl,fCallback){
        var _script=document.createElement('script');
        _script.setAttribute('charset','utf-8');
        _script.setAttribute('type','text/javascript');
        _script.setAttribute('src',sUrl);
		if(MiniSite.Browser.opera)
		{
			setTimeout(function(){addjs(_script)},1);
		}
		else
		{
			document.getElementsByTagName('head')[0].appendChild(_script);
		}
        
        if(MiniSite.Browser.ie){
            _script.onreadystatechange=function(){
                if(this.readyState=='loaded'||this.readyState=='complete'){
                    fCallback();
                }
            };
        }else if(MiniSite.Browser.moz){
            _script.onload=function(){
                fCallback();
            };
        }else{
            fCallback();
        }
    }
};


if(ppd_ad_width==1023)
{
document.write('<script language="javascript" >MiniSite.JsLoader.load("http:\/\/ppdjs.brothersoft.com/ppd_ads.php?ppd_ad_width=1023&ppd_ad_height=1023&keyword='+keyword+'&ppd_ad_pageSize=3&ppd_ad_pageDisplay=3&page=1&sub_category_id=0&type=js&iscomment=2",function(){})<\/script>');
}
else if(ppd_ad_width==1024)
{
	document.write('<script language="javascript" >MiniSite.JsLoader.load("http:\/\/ppdjs.brothersoft.com/ppd_ads.php?ppd_ad_width=1024&ppd_ad_height=1024&keyword='+keyword+'&ppd_ad_pageSize=3&ppd_ad_pageDisplay=3&page=1&sub_category_id=409&type=js&iscomment=2",function(){})<\/script>')

	}
else if(ppd_ad_width==2000)
{
	document.write('<script language="javascript" >MiniSite.JsLoader.load("http:\/\/ppdjs.brothersoft.com/ppd_ads.php?ppd_ad_width=2000&ppd_ad_height=2000&keyword=Brothersoft-Game-Homepage&ppd_ad_pageSize=3&ppd_ad_pageDisplay=3&page=1&sub_category_id=0&type=js&iscomment=2",function(){})<\/script>')}
else if(ppd_ad_width==420)
{
	
	src ='<script language="javascript" >page=getPage()>3?3:getPage();page=page<1?1:page;MiniSite.JsLoader.load("http:\/\/ppdjs.brothersoft.com/ppd_ads.php?ppd_ad_width=420&ppd_ad_height=80&keyword=Brothersoft-HomePage-420-60&ppd_ad_pageSize=6&ppd_ad_pageDisplay=2&page="+page+"&sub_category_id=0&type=js&iscomment=2",function(){})<\/script>';
	document.write(src);
}
else if(ppd_ad_width==300)
{
	document.write('<div id="ppd_content_div"></div><script language="javascript" >MiniSite.JsLoader.load("http:\/\/ppdjs.brothersoft.com/ppd_ads.php?ppd_ad_width=300&ppd_ad_height=200&keyword=Brothersoft-HomePage-420-60&ppd_ad_pageSize=5&ppd_ad_pageDisplay=5&page=1&sub_category_id=0&type=js&iscomment=2",function(){})<\/script>');
}
else if(ppd_ad_width=480)
{
	document.write('<div id="ppd_content_div"></div><script language="javascript" >MiniSite.JsLoader.load("http:\/\/ppdjs.brothersoft.com/ppd_ads.php?ppd_ad_width=480&ppd_ad_height=480&keyword='+keyword+'&ppd_ad_pageSize=3&ppd_ad_pageDisplay=3&sub_category_id=0&type=js&iscomment=2",function(){})<\/script>')
}