
// KEY for http://signcokc.com
// ABQIAAAAjQ9-JXErPftyHiIAhAuCbBS-6xn7DyNx_s6i9ZiOa-jkD6OIehRO8gkwhWrnzp_7VuUf-PFB-o7q8Q

// KEY for http://signcokc.com.previewdns.com/
// ABQIAAAAjQ9-JXErPftyHiIAhAuCbBSMGFtEAHxsvDKPeL2RsHIE_ZtRbhSmerZnpf3gTkg_nnlAqLl975iEvQ

// KEY for http://signco.bigdogmultimedia.com/
// ABQIAAAAjQ9-JXErPftyHiIAhAuCbBSAW41smbUoo73HwdfxbKOWJnJWGxS0dNxOOrOr2JvmX0zZbY2dDVA_vg

document.write('<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjQ9-JXErPftyHiIAhAuCbBSAW41smbUoo73HwdfxbKOWJnJWGxS0dNxOOrOr2JvmX0zZbY2dDVA_vg" type="text/javascript"></scr'+'ipt>');

// START MONITOR LINKS

function MonitorLinks(){
if(document.getElementById && document.getElementsByTagName){

if(document.getElementById('wrapper')){
var MyDiv = document.getElementById('wrapper');
var MyLinks = MyDiv.getElementsByTagName('a');
for(var i=0;i<MyLinks.length;i++){
MyLinks[i].onfocus=function(){
this.blur();
};
}
}

// START GALLERY MOUSEOVERS

if(document.getElementById('thumbdiv')){
var MyDiv2 = document.getElementById('thumbdiv');
var MyLinks2 = MyDiv2.getElementsByTagName('a');
for(var i=0;i<MyLinks2.length;i++){

MyLinks2[i].onclick=function(){
return false;
};

MyLinks2[i].onmouseover=function(){
LoadMyPic(this);
};

MyLinks2[i].onmouseout=function(){
LoadMyPic(MyFirstPic);
};

}
}

// END GALLERY MOUSEOVERS



// START CONTACT FORM

if(document.getElementById('contact_submit')){
document.getElementById('contact_submit').onmouseover=function(){
this.src = baseurl + "images/buttons/submitbutton_over.gif";
};
document.getElementById('contact_submit').onmouseout=function(){
this.src = baseurl + "images/buttons/submitbutton.gif";
};
}

// END CONTACT FORM

// START QUOTE FORM

if(document.getElementById('quote_submit')){
document.getElementById('quote_submit').onmouseover=function(){
this.src = baseurl + "images/buttons/submitbutton_over.gif";
};
document.getElementById('quote_submit').onmouseout=function(){
this.src = baseurl + "images/buttons/submitbutton.gif";
};
}

// END QUOTE FORM

// START UPLOAD FORM

if(document.getElementById('upload_submit')){
document.getElementById('upload_submit').onmouseover=function(){
this.src = baseurl + "images/buttons/submitbutton_over.gif";
};
document.getElementById('upload_submit').onmouseout=function(){
this.src = baseurl + "images/buttons/submitbutton.gif";
};
}

// END UPLOAD FORM

}
}

// END MONITOR LINKS

// START LOAD FLASH

function LoadFlash(path,height,width){

	document.write('<object id=VideoPlayer codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0 height="' + height + '" width="' + width + '" align=middle classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 viewastext>');
	document.write('<param name="Movie" value="' + path + '">');
	document.write('<param name="Src" value="' + path + '">');	
	document.write('<param name="Quality" value="High">');
	document.write('<param name="BgColor" value="#000000">');
	document.write('<param name="wMode" value="transparent">');
	document.write('<param name="AllowScriptAccess" value="always">');
	document.write('<embed src="' + path + '" ');	
	document.write('quality="high" bgcolor="#000000" wMode="transparent" width="' + width + '" height="' + height + '" name="VideoPlayer" align="middle" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('<\/object>');
}

// END LOAD FLASH

// START LOAD BUTTONBAR

function LoadButtonBar(baseurl){

var randomnumber = Math.floor(Math.random()*1001);
var path = baseurl + "flash/buttonbar/buttonbar.swf?var=" + randomnumber;
var height = 42;
var width = 732;

var myButtonBar = '<object id=VideoPlayer codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0 height="' + height + '" width="' + width + '" align=middle classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 viewastext>\n';
myButtonBar = myButtonBar + '<param name="Movie" value="' + path + '">\n';
myButtonBar = myButtonBar + '<param name="Src" value="' + path + '">\n';	
myButtonBar = myButtonBar + '<param name="Quality" value="High">\n';
myButtonBar = myButtonBar + '<param name="BgColor" value="#000000">\n';
myButtonBar = myButtonBar + '<param name="wMode" value="transparent">\n';
myButtonBar = myButtonBar + '<param name="AllowScriptAccess" value="always">\n';
myButtonBar = myButtonBar + '<embed src="' + path + '" \n';	
myButtonBar = myButtonBar + 'quality="high" bgcolor="#000000" wMode="transparent" width="' + width + '" height="' + height + '" name="VideoPlayer" align="middle" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n';
myButtonBar = myButtonBar + '<\/object>\n';

document.getElementById('buttonbar2').innerHTML = myButtonBar;
}

// END LOAD BUTTONBAR

// START LOAD SLIDESHOW

function LoadSlideShow(baseurl,framecount){

var randomnumber = Math.floor(Math.random()*1001);
var path = baseurl + "flash/slideshow/slideshow.swf?var=" + randomnumber + "&frameCount=" + framecount;
var height = 300;
var width = 720;

var mySlideShow = '<object id=VideoPlayer codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0 height="' + height + '" width="' + width + '" align=middle classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 viewastext>\n';
mySlideShow = mySlideShow + '<param name="Movie" value="' + path + '">\n';
mySlideShow = mySlideShow + '<param name="Src" value="' + path + '">\n';	
mySlideShow = mySlideShow + '<param name="Quality" value="High">\n';
mySlideShow = mySlideShow + '<param name="BgColor" value="#000000">\n';
mySlideShow = mySlideShow + '<param name="wMode" value="transparent">\n';
mySlideShow = mySlideShow + '<param name="AllowScriptAccess" value="always">\n';
mySlideShow = mySlideShow + '<embed src="' + path + '" \n';	
mySlideShow = mySlideShow + 'quality="high" bgcolor="#000000" wMode="transparent" width="' + width + '" height="' + height + '" name="VideoPlayer" align="middle" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n';
mySlideShow = mySlideShow + '<\/object>\n';

document.getElementById('slideshow2').innerHTML = mySlideShow;
}

// END LOAD SLIDESHOW

// START LOAD MY PIC

function LoadMyPic(MyPic){
var MyDiv = document.getElementById('mypicdiv');
MyDiv.innerHTML = '<img src="'+MyPic+'" class="mypicclass">';
document.getElementById('thumbdiv').style.display = "block";
}

// END LOAD MY PIC

// START NO YELLOW

if(window.attachEvent)
window.attachEvent("onload",setListeners);
function setListeners(){
inputList = document.getElementsByTagName("INPUT");
for(i=0;i<inputList.length;i++){
inputList[i].attachEvent("onpropertychange",restoreStyles);
inputList[i].style.backgroundColor = "";
}
selectList = document.getElementsByTagName("SELECT");
for(i=0;i<selectList.length;i++){
selectList[i].attachEvent("onpropertychange",restoreStyles);
selectList[i].style.backgroundColor = "";
}
}
function restoreStyles(){
if(event.srcElement.style.backgroundColor != "")
event.srcElement.style.backgroundColor = "";
}
if(window.attachEvent){
window.attachEvent("onload",resetStyles);
}
else{
window.addEventListener("load",resetStyles,false);
window.addEventListener("focus",resetStyles,false);   
}
function resetStyles(){
resetStyle('input');
resetStyle('select');
}
function resetStyle(inputType){
var count=document.getElementsByTagName(inputType);
for(var i=0;i<count.length;i++){
if(window.attachEvent){
count[i].attachEvent('onpropertychange',resetBC);
}
else{
resetOther(count[i]);
}
}
}
function resetOther(El){
if(El.style.backgroundColor!='')
El.style.backgroundColor='';
}
function resetBC(){
if(event.srcElement.style.backgroundColor!='')
event.srcElement.style.backgroundColor='';
}

// END NO YELLOW 

// START VALID EMAIL

function echeck(str) {
 
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)

if (str.indexOf(at)==-1)
return false;
 
if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
return false;
 
if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
return false;
 
if (str.indexOf(at,(lat+1))!=-1)
return false;

if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
return false;

if (str.indexOf(dot,(lat+2))==-1)
return false;
	
if (str.indexOf(" ")!=-1)
return false;

return true;
				
}

// END VALID EMAIL

// START CHECK FILE EXTENSION

function getFileExtension(id) 
{  
var fileinput = document.getElementById(id);  
if(!fileinput ) 
return "";  
var filename = fileinput.value;  
if( filename.length == 0 ) 
return "";  
var dot = filename.lastIndexOf(".");  
if( dot == -1 ) return "";  
var extension = filename.substr(dot,filename.length);  
return extension.toLowerCase(); 
}

// END CHECK FILE EXTENSION

// START VALID FILE TYPE

function ValidFileType(MyExtension) 
{  
var GoodFile = 0;
if(MyExtension == '.ai'){GoodFile++;}
if(MyExtension == '.eps'){GoodFile++;}
if(MyExtension == '.psd'){GoodFile++;}
if(MyExtension == '.plt'){GoodFile++;}
if(MyExtension == '.pdf'){GoodFile++;}
if(MyExtension == '.tiff'){GoodFile++;}
if(MyExtension == '.jpg'){GoodFile++;}
if(MyExtension == '.jpeg'){GoodFile++;}
if(MyExtension == '.doc'){GoodFile++;}
if(MyExtension == '.dwg'){GoodFile++;}
return GoodFile;
}

// END VALID FILE TYPE

// START VALIDATE FORM

function ValidateForm(id) {

if(id == 'quote'){

var Count = 0;
var Message = "";

var Name = document.getElementById('quote_name');
var Company = document.getElementById('quote_company');
var Phone = document.getElementById('quote_phone');
var Fax = document.getElementById('quote_fax');
var Email = document.getElementById('quote_email');
var Preferred = document.getElementById('quote_preferred');
var Type = document.getElementById('quote_type');
var Size = document.getElementById('quote_size');
var Quantity = document.getElementById('quote_quantity');
var Colors = document.getElementById('quote_colors');
var Sides = document.getElementById('quote_sides');
var Description = document.getElementById('quote_description');
var Vcode = document.getElementById('quote_vcode');
var Hcode = document.getElementById('quote_hcode');
var HexCode = hex_md5(Vcode.value);

var UserFile = document.getElementById('quote_userfile').value;

if( Name.value == "" ) { Count++; Message = Message + Count+'. Please Enter Your Name\n'; }
if( Phone.value == "" ) { Count++; Message = Message + Count+'. Please Enter Your Phone Number\n'; }
if( Email.value == "" ) { Count++; Message = Message + Count+'. Please Enter Your Email Address\n'; }
if( Description.value == "" ) { Count++; Message = Message + Count+'. Please Fill In The Job Description\n'; }
if( Vcode.value == "" ) { Count++; Message = Message + Count+'. Please Enter Image Verification Code\n'; }

if(Count > 0){
alert(Message);
if( Vcode.value == "" ) { Vcode.focus(); }
if( Description.value == "" ) { Description.focus(); }
if( Email.value == "" ) { Email.focus(); }
if( Phone.value == "" ) { Phone.focus(); }
if( Name.value == "" ) { Name.focus(); }
return false;
}

if(echeck(Email.value) == false){
alert("Please Enter a Valid Email Address");
Email.value = "";
Email.focus();
return false;
}

if(Hcode.value != HexCode){
var alertMsg = "You entered an incorrect code\n";
alertMsg = alertMsg + "Please note that the code is case sensitive\n";
alertMsg = alertMsg + "This prevents Spam Bots from accessing this form\n\n";
alertMsg = alertMsg + "Please reenter the code\n";
alert(alertMsg);
Vcode.value = "";
Vcode.focus();
return false;
}

if(UserFile != ""){
var FileExtension = getFileExtension('quote_userfile');
var GoodFile = ValidFileType(FileExtension);
if(GoodFile == 0){
alert('The file you are trying to upload is not a supported filetype');
return false;
}
}

return true;

}

if(id == 'contact'){

var Count = 0;
var Message = "";

var Name = document.getElementById('contact_name');
var Email = document.getElementById('contact_email');
var Phone = document.getElementById('contact_phone');
var Msg = document.getElementById('contact_message');
var Vcode = document.getElementById('contact_vcode');
var Hcode = document.getElementById('contact_hcode');
var HexCode = hex_md5(Vcode.value);

if( Name.value == "") { Count++; Message = Message + Count+'. Please Enter Your Name\n'; }
if( Email.value == "") { Count++; Message = Message + Count+'. Please Enter Your Email Address\n'; }
if( Vcode.value == "") { Count++; Message = Message + Count+'. Please Enter Image Verification Code\n'; }
if( Msg.value == "") { Count++; Message = Message + Count+'. Please Enter Your Message\n'; }

if(Count > 0){
alert(Message);
if( Msg.value == "") { Msg.focus(); }
if( Vcode.value == "") { Vcode.focus(); }
if( Email.value == "") { Email.focus(); }
if( Name.value == "") { Name.focus(); }
return false;
}

if(echeck(Email.value) == false){
alert("Please Enter a Valid Email Address");
Email.value = "";
Email.focus();
return false;
}

if(Hcode.value != HexCode){
var alertMsg = "You entered an incorrect code\n";
alertMsg = alertMsg + "Please note that the code is case sensitive\n";
alertMsg = alertMsg + "This prevents Spam Bots from accessing this form\n\n";
alertMsg = alertMsg + "Please reenter the code\n";
alert(alertMsg);
Vcode.value = "";
Vcode.focus();
return false;
}

return true;

}

if(id == "upload"){

var Count = 0;
var Message = "";

var Name = document.getElementById('upload_name');
var Email = document.getElementById('upload_email');
var File = document.getElementById('upload_userfile');
var Vcode = document.getElementById('upload_vcode');
var Hcode = document.getElementById('upload_hcode');
var HexCode = hex_md5(Vcode.value);

var UserFile = File.value;

if( Name.value == "") { Count++; Message = Message + Count+'. Please Enter Your Name\n'; }
if( Email.value == "") { Count++; Message = Message + Count+'. Please Enter Your Email Address\n'; }
if( Vcode.value == "") { Count++; Message = Message + Count+'. Please Enter Image Verification Code\n'; }
if( File.value == "") { Count++; Message = Message + Count+'. Please Select File to Upload\n'; }

if(Count > 0){
alert(Message);
if( File.value == "") { File.focus(); }
if( Vcode.value == "") { Vcode.focus(); }
if( Email.value == "") { Email.focus(); }
if( Name.value == "") { Name.focus(); }
return false;
}

if(echeck(Email.value) == false){
alert("Please Enter a Valid Email Address");
Email.value = "";
Email.focus();
return false;
}

if(Hcode.value != HexCode){
var alertMsg = "You entered an incorrect code\n";
alertMsg = alertMsg + "Please note that the code is case sensitive\n";
alertMsg = alertMsg + "This prevents Spam Bots from accessing this form\n\n";
alertMsg = alertMsg + "Please reenter the code\n";
alert(alertMsg);
Vcode.value = "";
Vcode.focus();
return false;
}

if(UserFile != ""){
var FileExtension = getFileExtension('upload_userfile');
var GoodFile = ValidFileType(FileExtension);
if(GoodFile == 0){
alert('The file you are trying to upload is not a supported filetype');
return false;
}
}

return true;
}

}

// END VALIDATE FORM

// START GOOGLE MAP

var map = null;
var geocoder = null;

function load() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
geocoder = new GClientGeocoder();
geocoder.getLatLng(
address,
function(point) {
if (!point) {
alert(address + " not found");
} else {
map.setCenter(point, 13);
var marker = new GMarker(point);
map.addOverlay(marker);
}
}
);
}
};

// END GOOGLE MAP

// START BBB LOGO FOR HOME PAGE

function BBBlogo(){
document.write('<a target="_blank" href="https://www.bbb.org/online/consumer/cks.aspx?id=1100218141350"><img id="bbblogo" title="Click to verify BBB accreditation and to see a BBB report." alt="Click to verify BBB accreditation and to see a BBB report." src="'+baseurl+'images/bbb/bbb.png"></a>');
}

// END BBB LOGO FOR HOME PAGE
