var pollClosed24015 = false;
var PDV_POLLRAND24015 = false;

var PDV_a24015 = "";
var PDV_o24015 = "";
var PDV_id24015 = 1565799;
var PDV_pt24015 = 0;
var PDV_po24015 = 1;
var PDV_s24015 = 66404;
var PDV_b24015 = 1;
var PDV_l24015 = 0;
var PDV_pr24015 = 1;
var PDV_w24015 = 24015;
 
var PDV_sl24015 = 0;
var PDV_va24015 = 16;

var PDV_lnk24015 = 0;



var PDV_def24015 = '#PDI_container24015 .pds-box {font-family:Lucida Grande,Verdana,Lucida Sans Regular,Lucida Sans Unicode,Arial,Verdana,sans-serif;border: 1px solid #D3D3D3;background: #F2F2F2;width: 320px;font-size:13px;text-align: left;color: #000;} #PDI_container24015 .pds-box-outer {padding: 15px 20px;} #PDI_container24015  .pds-question-top {font-size:1.1em;line-height: 150%;font-weight: bold;position:relative;} #PDI_container24015  .pds-answer {padding: 10px 0px 15px 0px;} #PDI_container24015  .pds-answer label{width: 250px;color: #272727;line-height: 150%;display:inline-block;padding: 7px 0px 9px 4px;float:left;font-weight: normal;} #PDI_container24015 .pds-radiobutton, .pds-checkbox {float:left;clear:left;margin-top:7px;padding: 0px;} #PDI_container24015 html>body .pds-radiobutton{margin-top:10px;} #PDI_container24015  html>body .pds-checkbox{margin-top:11px;} #PDI_container24015  .pds-textfield{background:#FFF;border:1px solid #DBDBDB;font-size:1em;margin: 0px 0px 0px 25px;padding:5px;width:200px;} #PDI_container24015  .pds-answer-feedback {background-color: #DDD;clear:left;margin: 0px 4px;position:relative;line-height: 0px;} #PDI_container24015  .pds-answer-feedback-bar {background: #7EC07E;height:10px;border: 1px solid #008500;margin: 0px;} #PDI_container24015 .pds-vote {color: #c3C4c7;} #PDI_container24015  .pds-votebutton-outer {height:35px;clear:left;} #PDI_container24015 .pds-votebutton-outer A{display: inline-block;margin-top: 15px;} #PDI_container24015 .pds-vote BR{float:left;line-height: 0px;display:none;} #PDI_container24015 .pds-vote a {float: left;font-size: 0.8em;float:left;padding: 0px 15px 0px 0px;color: #777;font-weight: normal;line-height: 22px;} #PDI_container24015 .pds-vote a:hover{color: #008D00;} #PDI_container24015 input.pds-votebutton {width: 62px;height: 36px;background: url(http://s3.polldaddy.com/images/tc2_but.gif) no-repeat;outline: none;float: right;margin: 0px 40px 0px 0px;} #PDI_container24015 input.pds-votebutton:hover {background: url(http://s3.polldaddy.com/images/tc2_but.gif) no-repeat 0 -37px;} #PDI_container24015 .pds-totalvotes-inner {font-size: 1em;font-weight: bold;color: #272727;padding: 0px 0px 10px 0px;position: relative;} #PDI_container24015 .pds-totalvotes-outer P{clear: left !important;line-height: 0px;padding: 0px;margin: 0px;}';

var PDV_POLL_q24015 = 'Where do you want to use a poll?'; var PDV_POLL_medType24015 = '0'; var PDV_POLL_medID24015 = '';
var PDV_A24015 = new Array();


  PDV_A24015[0] = new Array(4); PDV_A24015[0][0] = "7987547"; PDV_A24015[0][1] = "WordPress";   PDV_A24015[0][2] = "0"; PDV_A24015[0][3] = "";

  PDV_A24015[1] = new Array(4); PDV_A24015[1][0] = "7987548"; PDV_A24015[1][1] = "My Website";   PDV_A24015[1][2] = "0"; PDV_A24015[1][3] = "";

  PDV_A24015[2] = new Array(4); PDV_A24015[2][0] = "7987549"; PDV_A24015[2][1] = "MySpace";   PDV_A24015[2][2] = "0"; PDV_A24015[2][3] = "";

  PDV_A24015[3] = new Array(4); PDV_A24015[3][0] = "7987550"; PDV_A24015[3][1] = "Piczo";   PDV_A24015[3][2] = "0"; PDV_A24015[3][3] = "";


var PDV_l1_24015 = 'View Results';
var PDV_l2_24015 = 'Other:';
var PDV_l3_24015  = '';

  
var PDV_l4_24015 = 'Please choose an answer first!';



//v2.61 11/Nov/09

if (pollClosed24015 == false)
 {
    var PDV_server24015 = 'http://polls.polldaddy.com';
    var AA24015 = new Array();
    var PDV_html24015 = '<div style="margin-bottom: 0px; margin-top: 0px;" name="PDI_form24015" id="PDI_form24015"><div class="pds-box"><div class="pds-box-outer"><div class="pds-box-inner"><div class="pds-box-top"><div class="pds-question"><div class="pds-question-outer"><div class="pds-question-inner"><div class="pds-question-top">' + media24015(PDV_POLL_medType24015, PDV_POLL_medID24015) + ' ' + unescape_HTML_24015( PDV_POLL_q24015 ) + '</div></div></div></div><div class="pds-answer"><span id="pds-answer24015"></span>';
    if (PDV_po24015 == 1)
    {
		PDV_html24015 += '<span class="pds-answer-group">';
		
        if (PDV_pt24015 == 0)
        {
            PDV_html24015 += '<span class="pds-answer-input"><input type="radio" name="PDI_answer24015" id="PDI_answerOther24015" value="other" class="pds-radiobutton"/></span>';
        }
        PDV_html24015 += '<label for="PDI_answerOther24015" class="pds-other-label"><span class="pds-answer-span">' + PDV_l2_24015 + '</span></label><span class="pds-answer-other"><br/><input class="pds-textfield" type="text" maxlength="80" id="PDI_OtherText24015" name="PDI_OtherText24015" onclick="PDI_checkOther24015();" onchange="PDI_checkOther24015(true);" /></span>';

		PDV_html24015 += '<span class="pds-clear"></span>';
		PDV_html24015 += '</span>';
    }

    PDV_html24015 += '</div><div class="pds-vote"><div class="pds-votebutton-outer">';

    if ( PDV_l3_24015 == '' )
    {
		PDV_l3_24015 = 'Vote';
    }
	
	if ( PDV_s24015 < 99 || PDV_def24015.indexOf('input.pds-votebutton') != -1 )	
	{
		if (PDV_l3_24015 == 'Vote' || PDV_l3_24015 == '')
	    {
	        PDV_html24015 += '<input type="button" class="pds-votebutton" style="border:none;cursor: pointer;" src="http://i.polldaddy.com/polls/spacer.gif" onclick="PD_vote24015(0);">';
	    }
	    else
	    {
	        PDV_html24015 += '<input type="button" class="pds-votebutton-pack" value="' + PDV_l3_24015 + '"  onclick="PD_vote24015(0);" />';
	    }
	}
	else
	{
		PDV_html24015 += '<a href="javascript:PD_vote24015(0);" id="pd-vote-button24015" class="pds-vote-button"><span>' + PDV_l3_24015 + '</span></a>';
	}

	PDV_html24015 += '<span class="pds-links">';

    if (PDV_pr24015 == 2) {
        PDV_html24015 += '<br/>';
    }
    else {
        PDV_html24015 += '<a href="javascript:PD_vote24015(1);" class="pds-view-results">' + PDV_l1_24015 + '</a><br/>';
    }

	if( typeof PDV_share24015 != "undefined") {
		if (PDV_share24015 == 1 ) {
			PDV_html24015 += '<a class="a2a_dd pds-share"  href="javascript:">' + PDV_l12_24015 + '</a>';
		}
	}
	
    if (PDV_lnk24015 == 1) {
        PDV_html24015 += '<a href="http://www.polldaddy.com" target="_blank" class="pds-pd-link">Polldaddy.com</a>';
    }

	PDV_html24015 += '<span class="pds-clear"></span>';
	PDV_html24015 += '</span><span class="pds-clear"></span>';
	
    PDV_html24015 += '</div></div></div></div></div></div></div>';

    for (PDV_x = 0; PDV_x < PDV_A24015.length; PDV_x++)
    {
        if (PDV_pt24015 == 0)
        {
            AA24015[PDV_x] = '<span class="pds-answer-group"><span class="pds-answer-input"><input class="pds-radiobutton" type="radio" id="PDI_answer' + PDV_A24015[PDV_x][0] + '" value="' + PDV_A24015[PDV_x][0] + '" name="PDI_answer24015" /></span><label for="PDI_answer' + PDV_A24015[PDV_x][0] + '" class="pds-input-label"><span class="pds-answer-span">' + unescape_HTML_24015( PDV_A24015[PDV_x][1] ) + '</span></label>' + media24015(PDV_A24015[PDV_x][2], PDV_A24015[PDV_x][3]) + '<span class="pds-clear"></span><br/></span>';
        }
        else
        {
            AA24015[PDV_x] = '<span class="pds-answer-group"><span class="pds-answer-input"><input class="pds-checkbox" type="checkbox" id="PDI_answer' + PDV_A24015[PDV_x][0] + '" value="' + PDV_A24015[PDV_x][0] + '" name="PDI_answer' + PDV_A24015[PDV_x][0] + '" onclick="javascript:PDF_mc24015(this);" /></span><label for="PDI_answer' + PDV_A24015[PDV_x][0] + '" class="pds-input-label"><span class="pds-answer-span">' + unescape_HTML_24015( PDV_A24015[PDV_x][1] ) + '</span></label>' + media24015(PDV_A24015[PDV_x][2], PDV_A24015[PDV_x][3]) + '<span class="pds-clear"></span><br/></span>';
        }
    }
}

function PDF_mc24015(obj){
	if ( PDV_pt24015 > 1 ){
		var nc = 0;
		for (i = 0; i < AA24015.length; i++)
	    {
	        r = document.getElementById(AA24015[i].substring(AA24015[i].indexOf('id=') + 4, AA24015[i].indexOf('"', AA24015[i].indexOf('id=') + 4)));
	        if (r.type == "checkbox" && r.checked) { nc += 1; }
	    }
	
		if (PDV_po24015 == 1)
	    {
			var otherText = document.getElementById("PDI_OtherText24015").value;
			if( otherText.length > 0 ) { nc += 1; }	
		}		
		
		if ( nc > PDV_pt24015 ){
			obj.checked = false;
			obj.disabled = true;
		}
		
		if ( nc >= PDV_pt24015 ){
			for (i = 0; i < AA24015.length; i++)
		    {
		        r = document.getElementById(AA24015[i].substring(AA24015[i].indexOf('id=') + 4, AA24015[i].indexOf('"', AA24015[i].indexOf('id=') + 4)));
		        if (r.type == "checkbox" && !r.checked) { r.disabled = true; }
		    }
		}
		else{
			if (PDV_po24015 == 1) { document.getElementById("PDI_OtherText24015").disabled=false; }
			for (i = 0; i < AA24015.length; i++)
		    {
		        r = document.getElementById(AA24015[i].substring(AA24015[i].indexOf('id=') + 4, AA24015[i].indexOf('"', AA24015[i].indexOf('id=') + 4)));
		        if (r.type == "checkbox" && !r.checked) { r.disabled = false; }
		    }
		}
	}
}

function PDF_a24015()
 {
    PDF_o24015();
    var r;
    if (PDV_pt24015 == 0)
    {
    	for (var i = 0; i < AA24015.length; i++)
        {
            r = document.getElementById(AA24015[i].substring(AA24015[i].indexOf('id=') + 4, AA24015[i].indexOf('"', AA24015[i].indexOf('id=') + 4)));
            if (r.checked) {
                return r.value + ",";
            }
        }
        r = document.getElementById("PDI_answerOther24015");
        if (r) {
            if (r.checked) {
                return r.value + ",";
            } else {
                return '';
            }
        } else {
            return "";
        }
    }
    else
    {
        for (i = 0; i < AA24015.length; i++)
        {
            r = document.getElementById(AA24015[i].substring(AA24015[i].indexOf('id=') + 4, AA24015[i].indexOf('"', AA24015[i].indexOf('id=') + 4)));
            if (r.type == "checkbox" && r.checked)
            {
                PDV_a24015 = PDV_a24015 + r.value + ",";
            }
        }
        return PDV_a24015;
    }
}
function PDF_o24015(r) {
    if (PDV_po24015 == 1) {
        PDV_o24015 = document.getElementById("PDI_OtherText24015").value;
    }
}
function PDI_checkOther24015( lostfocus )
 {
	var reset = false;
	if( lostfocus ){
		var ot = document.getElementById("PDI_OtherText24015").value;
		if( ot.length == 0 ){ reset = true; }
	}
	
    if (PDV_pt24015 == 0)
    {
		if(lostfocus && reset){ document.getElementById("PDI_answerOther24015").checked = false; }
		else{ document.getElementById("PDI_answerOther24015").checked = true; }
    }
	else if ( PDV_pt24015 > 1 ){
		var nc = 1;
		obj = document.getElementById("PDI_OtherText24015");
		if(lostfocus && reset){ nc = 0; }
		
		for (i = 0; i < AA24015.length; i++)
	    {
	        r = document.getElementById(AA24015[i].substring(AA24015[i].indexOf('id=') + 4, AA24015[i].indexOf('"', AA24015[i].indexOf('id=') + 4)));
	        if (r.type == "checkbox" && r.checked) { nc += 1; }
	    }

		if ( nc > PDV_pt24015 ){
			obj.disabled=true;
			obj.value='';
			for (i = 0; i < AA24015.length; i++)
		    {
		        r = document.getElementById(AA24015[i].substring(AA24015[i].indexOf('id=') + 4, AA24015[i].indexOf('"', AA24015[i].indexOf('id=') + 4)));
		        if (r.type == "checkbox" && !r.checked) { r.disabled = true; }
		    }
		}
		else if( nc < PDV_pt24015 ){
			obj.disabled=false;
			for (i = 0; i < AA24015.length; i++)
		    {
		        r = document.getElementById(AA24015[i].substring(AA24015[i].indexOf('id=') + 4, AA24015[i].indexOf('"', AA24015[i].indexOf('id=') + 4)));
		        if (r.type == "checkbox" && !r.checked) { r.disabled = false; }
		    }
		}
	}
}
function PD_vote24015(R)
 {
    var randomnumber = Math.floor(Math.random() * 11);
    if (R == 1)
    {
        var s = document.createElement("SCRIPT");
        s.charset = "utf-8";
        s.src = PDV_server24015 + "/vote-js.php?s=" + PDV_s24015 + "&vr=1&b=" + PDV_b24015 + "&p=" + PDV_id24015 + "&l=" + PDV_l24015 + "&sl=" + PDV_sl24015 + "&pr=" + PDV_pr24015 + "&pt=" + PDV_pt24015 + "&va=" + PDV_va24015 + "&cookie=" + PD_ck24015 + "&rdm=" + randomnumber + "&url=" + escape(location.href) + "&w=" + PDV_w24015;
        var h = document.getElementsByTagName("head").item(0);
        h.appendChild(s);
    }
    else
    {
        if (PDV_b24015 > 0)
        {
            Set_Cookie24015('PD_poll_' + PDV_id24015, 'true', 0, '/', '', '');
        }
        PDV_a24015 = '';
        PDV_a24015 = PDF_a24015(document.getElementById("PDI_form24015"));
        if (PDV_a24015.length == 0 && PDV_o24015.length == 0)
        {
            alert(PDV_l4_24015);
        }
        else
        {
			if ( PDV_def24015.indexOf('input.pds-votebutton') == -1 ) {
				document.getElementById('pd-vote-button24015').className = 'pds-vote-button-load';
			}
	
            var s = document.createElement("SCRIPT");
            s.charset = "utf-8";
            s.src = PDV_server24015 + "/vote-js.php?s=" + PDV_s24015 + "&b=" + PDV_b24015 + "&p=" + PDV_id24015 + "&a=" + PDV_a24015 + "&o=" + PDV_o24015 + "&l=" + PDV_l24015 + "&sl=" + PDV_sl24015 + "&pr=" + PDV_pr24015 + "&pt=" + PDV_pt24015 + "&va=" + PDV_va24015 + "&cookie=" + PD_ck24015 + "&rdm=" + randomnumber + "&url=" + escape(location.href) + "&w=" + PDV_w24015;
            var h = document.getElementsByTagName("head").item(0);
            h.appendChild(s);
        }
    }
}
var PD_pollString24015 = PDV_html24015;
var PD_ck24015 = 0;

function PDV_rand24015(myArray) {
    var i = myArray.length;
    if (i == 0) return false;
    while (--i) {
        var j = Math.floor(Math.random() * (i + 1));
        var tempi = myArray[i];
        var tempj = myArray[j];
        myArray[i] = tempj;
        myArray[j] = tempi;
    }
    return myArray;
}


function PDV_go24015()
 {
    if (!document.getElementById('poll_style24015'))
    {
        fileref = document.createElement("style");
        fileref.setAttribute("type", "text/css");
        fileref.setAttribute("id", "poll_style24015");
        if (fileref.styleSheet)
        // IE
        {
            fileref.styleSheet.cssText = PDV_def24015;
        }
        else
        // the world
        {
            fileref.appendChild(document.createTextNode(PDV_def24015));
        }
        document.getElementsByTagName("head").item(0).appendChild(fileref);
    }
    if (!document.getElementById('PDI_container24015'))
    {
        document.write('<a name="pd_a_24015" style="display: inline; padding: 0px; margin: 0px;"></a><div class="PDS_Poll" id="PDI_container24015"></div>');
    }
    if (Get_Cookie24015('PD_poll_' + PDV_id24015) == 'true')
    {
        PD_ck24015 = 1;
    }

    document.getElementById('PDI_container24015').innerHTML = PD_pollString24015 + '<img src="http://pixel.quantserve.com/pixel/p-ab3gTb8xb3dLg.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>';

    if (PDV_POLLRAND24015) {
        AA24015 = PDV_rand24015(AA24015);
    }
    y24015 = '';
    for (x24015 = 0; x24015 < AA24015.length; x24015++) {
        y24015 = y24015 + AA24015[x24015];
    }
    document.getElementById('pds-answer24015').innerHTML = y24015;
	share24015();
}
function Set_Cookie24015(name, value, expires, path, domain, secure)
 {
    var today = new Date();
    today.setTime(today.getTime());
    if(typeof(PDV_expire24015) !== 'undefined') {
    	expires = parseInt( PDV_expire24015 );
    }
    if (expires>0) {
        expires = expires * 1000;
    } else{
    	expires = 60 * 60 * 24 * 30 * 1000;
    }

    var expires_date = new Date(today.getTime() + (expires));

    document.cookie = name + "=" + escape(value) +
    ((expires) ? ";expires=" + expires_date.toGMTString() : "") +
    ((path) ? ";path=" + path: "") +
    ((domain) ? ";domain=" + domain: "") +
    ((secure) ? ";secure": "");
}

function Get_Cookie24015(check_name)
 {
    var a_all_cookies = document.cookie.split(';');
    var a_temp_cookie = '';
    var cookie_name = '';
    var cookie_value = '';
    var b_cookie_found = false;

    for (i = 0; i < a_all_cookies.length; i++)
    {
        a_temp_cookie = a_all_cookies[i].split('=');
        cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
        if (cookie_name == check_name)
        {
            b_cookie_found = true;
            if (a_temp_cookie.length > 1)
            {
                cookie_value = unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g, ''));
            }
            return cookie_value;
            break;
        }
        a_temp_cookie = null;
        cookie_name = '';
    }
    if (!b_cookie_found)
    {
        return null;
    }
}

if (pollClosed24015 == false)
 {
    PDV_go24015();
}

function st_go24015(a)
 {
    var i;
    var u = document.location.protocol + '//stats.polldaddy.com/p.gif?host=' + escape(document.location.host) + '&rand=' + Math.random();

    for (i in a)
    {
        u = u + '&' + i + '=' + escape(a[i]);
    }
    u = u + '&ref=' + escape(document.referrer);
    var TrkImg = new Image();
    TrkImg.src = u;
}

st24015 = {
    "p": "24015",
    "v": "0"
};

st_go24015(st24015);

function share24015()
{
	if( typeof PDV_share24015 != "undefined") {
		if (PDV_share24015 == 1 ) {
			a2a_linkname = 'Poll: ' + PDV_POLL_q24015;
			a2a_linkurl = document.location + '#pd_a_24015';
			a2a_track_links = 'custom';
			a2a_track_links_key = document.location + '#pd_a_24015';
			a2a_onclick = 1;
			
	        var s = document.createElement("SCRIPT");
	        s.charset = "utf-8";
	        s.src = "http://static.addtoany.com/menu/page.js";
	        var h = document.getElementsByTagName("head").item(0);
	        h.appendChild(s);
		}
	}
}

function media24015(medType, medID)
 {
    switch (medType)
    {
    case '0':
        {
            return '';
            break;
        }
    case '1':
        {
            return '<div style="padding: 10px 0px;"><a target="_blank" href="http://services.nirvanix.com/polldaddy/polldaddy/images/' + medID + '.jpg"><img border="0" title="Click to enlarge" src="http://services.nirvanix.com/polldaddy/polldaddy/images/' + medID + '_sml.jpg"></a></div>';
            break;
        }
    case '2':
        {
            return '<div style="padding: 10px 0px;"><object width="200" height="161"><param name="movie" value="http://www.youtube.com/v/' + medID + '&amp;hl=en&amp;fs=1"><param name="allowFullScreen" value="true"><embed type="application/x-shockwave-flash" allowfullscreen="true" width="200" height="161" src="http://www.youtube.com/v/' + medID + '&amp;hl=en&amp;fs=1"></embed></object></div>';
            break;
        }
    case '3':
        {
            return '<div style="padding: 10px 0px;"><object width="200" height="163"><param name="movie" value="http://seesmic.com/embeds/wrapper.swf"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="flashVars" value="video=' + medID + '&amp;version=threadedplayer"><embed src="http://seesmic.com/embeds/wrapper.swf" type="application/x-shockwave-flash" allowFullScreen="true" wmode="transparent" allowScriptAccess="always" width="200" height="163" flashvars="video=' + medID + '&amp;version=threadedplayer"></embed></object></div>';
            break;
        }
    }
}

function unescape_HTML_24015(html) {
	var htmlNode = document.createElement("DIV");
	
	htmlNode.innerHTML = html;
	
	if(htmlNode.innerText !== undefined)
		return htmlNode.innerText; // IE
	
	return htmlNode.textContent; // FF
}

if (pollClosed24015 == true)
{
	share24015();
}