﻿if (typeof jQuery == 'undefined') {  
    document.writeln("  <script src=\"http:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.5\/jquery.min.js\"><\/script>");
} 


document.writeln("  <link href=\"http:\/\/www.birddogjobs.com\/BNP\/widget\/StyleSheet.css\" rel=\"stylesheet\" type=\"text\/css\" \/>");
document.writeln("");
document.writeln("  <div id=\"bdjwidget\">");
document.writeln("    <div id=\"bdjheader\" onclick=\'geturl();\'><img src= \"http:\/\/www.birddogjobs.com\/BNP\/widget\/Images\/widgettop.png\" width=\"95%\"  alt=\"BirdDog\" \/>");
document.writeln(" <img src= \"http:\/\/www.birddogjobs.com\/BNP\/widget\/Images\/question.png\" width=\"100%\"  alt=\"BirdDog\" \/> ");
document.writeln("    <\/div>");
document.writeln("    <div id=\"bdjform1\">");
document.writeln("      ");
document.writeln("      <table width=\"100%\" border=\" 0\">");
document.writeln("  <tr>");
document.writeln("    <td><input name=\"ans\" type=\"radio\"  value=\"1\" \/><\/td>");
document.writeln("");
document.writeln("    <td><p>Lack of qualified talent.<\/p><\/td>");
document.writeln("  <\/tr>");
document.writeln("  <tr>");
document.writeln("    <td><input name=\"ans\" type=\"radio\"  value=\"2\"\/><\/td>");
document.writeln("    <td><p>Too many unqualified applicants.<\/p><\/td>");
document.writeln("  <\/tr>");
document.writeln("  <tr>");
document.writeln("    <td><input name=\"ans\" type=\"radio\"  value=\"3\" \/><\/td>");
document.writeln("");
document.writeln("    <td><p>No time to recruit.<\/p><\/td>");
document.writeln("  <\/tr>");
document.writeln("<\/table>");
document.writeln("<button type=\"submit\" onclick=\'geturl();\' width=\"100%\">Vote and<br \/>");
document.writeln("Get Results<\/button>");
document.writeln("<br \/><br \/>");
document.writeln("    <\/div>");
document.writeln("    <div id=\"bdjfooter\" onclick=\'geturl();\'> <img src=\"http:\/\/www.birddogjobs.com\/BNP\/widget\/Images\/widgetbottom.png\" width=\"118\" height=\"50\" alt=\"BirdDog\" \/> <\/div>");
document.writeln("");
document.writeln("  <\/div>");



function geturl() {
var view = "&view=1"
var host = window.location.host;

if (host == "www.roofingcontractor.com" ){
view = "&view=2"
}

if (host == "www.arwmag.com" ){
view = "&view=2"
}
 
if (host == "www.siteprepmag.com" ){
view = "&view=3"
}

if (host == "www.pobonline.com" ){
view = "&view=3"
}

 if (host == "www.sdmmag.com" ){
view = "&view=4"
}

 if (host == "www.securitymagazine.com" ){
view = "&view=4"
}
 
 if (host == "www.stoneworld.com" ){
view = "&view=5"
}

 if (host == "www.cstdmag.com" ){
view = "&view=5"
}

 if (host == "www.tilemagonline.com" ){
view = "&view=5"
} 
 
 if (host == "www.fcimag.com" ){
view = "&view=5"
}
 
 if (host == "www.ntlfloortrends.com" ){
view = "&view=5"
}

 if (host == "www.icsmag.com" ){
view = "&view=6"
}

 if (host == "www.randrmagonline.com" ){
view = "&view=6"
}

 if (host == "www.pmmag.com" ){
view = "&view=7"
}

 if (host == "www.pmengineer.com" ){
view = "&view=7"
}

 if (host == "www.supplyht.com" ){
view = "&view=7"
}

 if (host == "www.reevesjournal.com" ){
view = "&view=7"
}

 if (host == "www.radiantandhydronics.com" ){
view = "&view=7"
}

 if (host == "www.bathandkitchenpro.com" ){
view = "&view=7"
}

 if (host == "www.achrnews.com" ){
view = "&view=8"
}

if (host == "www.jakedx6.com" ){
view = "&view=x"
}


var startlink = "http://www.birddogjobs.com/BNP/PollDataProcess.aspx" ;
var endlink = "" ;

if ($("input[name=ans]:checked").val() == '1') {
	  endlink = "?ans=1" ;
	  }
if ($("input[name=ans]:checked").val() == '2') {
	  endlink = "?ans=2" ;
	  }					 
if ($("input[name=ans]:checked").val() == '3') {
	  endlink = "?ans=3" ;
	  } else endlink = "?ans=0";
window.open(startlink + endlink + view) ;

};
