function setStrapTitle(){
var t=new String(document.title)
var i=t.indexOf(".",0) 
	if(i>0)
	    t=t.substr(0,i)
	else{
	    i=t.indexOf("|",0)
	    if(i>0) t=t.substr(0,i)
	}
	t=t.split(" - ")
	for(i in t)
		document.write("<p class=strapP"+(i==0?1:2)+">"+t[i].toUpperCase()+"</p>")
}
function setStrapColour(rgb){
	strapTable.style.backgroundColor=rgb
}
function doStrapLine(){
var s;
var s1;
var s2;
var target;
    document.write('<table id=strapTable align=center class=strap cellpadding=0 cellspacing=0 width=1022><tr><td class=strapHD>')
    setStrapTitle()
    document.write('</td>')
    if(typeof(strapData)!="undefined"){
	    document.write('<td align=right><div style="width:'+(strapData.length/3*214)+'px">')
    	for(i=0;i<strapData.length;i+=3){
	        switch(strapData[i+2].substring(strapData[i+2].lastIndexOf(".")+1).toLowerCase()){
	        case "swf":
                writeFlash(strapData[i+2],strapData[i+1],"210","60")
	            break;
    	    default:
        		if(strapData[i].substring(0,1)=='='){
				    s=strapData[i].substring(1).split("|");
				    target="";
				}
                else{
   				    s=strapData[i].split("|");
                    target=" target=_blank";
                }
				if(s.length==2){
				    s1=s[0];
				    s2=s[1].substr(0,1)=="/"?window.location.host+s[1]:s[1];
				}
				else{
				    s1="0";
				    s2=s[0].substr(0,1)=="/"?window.location.host+s[0]:s[0];
		    	}
    			document.write('<a href="http://click.ppma.info?'+s1+'|2|'+s2+'"'+target+'>')
        		document.write('<img style="margin-left:2px;margin-right:2px" alt="'+strapData[i+1]+'" src="../'+strapData[i+2]+'" height=60 border=0></a>')
	        }
	    }
	    document.write('</div></td>')
    }
    document.write('</tr></table>');
}

doStrapLine();

