/* Copyright: Copyright (c) 2008 http://ramui.com. All rights reserved.This product is protected by copyright and distributed under licenses restricting copying, distribution. Permission is granted to the public to download and use this script provided that this Notice and any statement of authorship are reproduced in every page on all copies of the script. */var site_ID = "";var site_URL = "";var biz_NAME = "";function validateForm(max){var errors='';var str=fw_trim(document.getElementById('fw_contact_name').value);if (str.length > 40){errors='Name must be within 40 characters.\n'; }if (str.length <3){errors='Please provide your name.\n'; }str=fw_trim(document.getElementById('fw_contact_message').value);if (str.length > max){errors+='Comment length must be within '+max+'characters.\n'; }if (str.length <10){errors+='Please enter your Comment.\n'; }str=fw_trim(document.getElementById('fw_contact_subject').value);if (str.length > 78){errors+='Subject length must be within 78 characters.\n'; }str=fw_trim(document.getElementById('fw_contact_from').value);if (!((str.indexOf(".") > 0) && (str.indexOf("@") > 0)&&(str.length < 100))){errors+='Enter a valid email.\n'; }if (errors){alert('The following error(s) occurred:\n'+errors+'\n' );return false;}return true;}function fw_mail(){        document.getElementById('fw_feedback').innerHTML="";    if(validateForm(3000)){        var url = "mail/index.php?sendmail=true&id=" + site_ID;        var params = "name=" + fw_total_encode(document.getElementById('fw_contact_name').value) + "&from=" +fw_total_encode(document.getElementById('fw_contact_from').value) +"&subject=" + fw_total_encode(        document.getElementById('fw_contact_subject').value) + "&message=" +fw_total_encode(document.getElementById('fw_contact_message').value);        var fw_connection=fw_connect(url,params);        fw_connection.onreadystatechange = function(){            if(fw_connection.readyState == 4 && fw_connection.status == 200){                document.getElementById('fw_feedback').innerHTML=fw_connection.responseText;            }        }    }}function openWindow(url,width,height,scrollbars){    var leftoffset = (screen.width - width - 10)/2;    var topoffset = (screen.height - width - 40)/2;    window.open(url,'_blank','titlebar=no,resizable=no,scrollbars=' + scrollbars + ',width=' + width + ',height=' + height + ',left=' + leftoffset + ',top=' + topoffset);}function fw_mouseMove(e){if(fw_cform!=null){e = e || window.event;fw_cform.style.left = fw_posX + e.clientX + "px";fw_cform.style.top  = fw_posY + e.clientY + "px";fw_deselect();}}function fw_start_draging(){fw_cform = document.getElementById('fw_dhtmlpopup');document.getElementById('fw_drag_header').style.cursor='move';}function fw_mouseUp(){if(parseInt(document.getElementById('fw_dhtmlpopup').style.left)<0){document.getElementById('fw_dhtmlpopup').style.left=0;}if(parseInt(document.getElementById('fw_dhtmlpopup').style.top)<0){document.getElementById('fw_dhtmlpopup').style.top=0;}document.getElementById('fw_drag_header').style.cursor='text';fw_cform = null;}function fw_mouseDown(e){if(fw_cform!=null){if (!e){e = window.event;}fw_cform.style.zIndex = 100;fw_posX = parseInt(fw_cform.style.left)-e.clientX;fw_posY = parseInt(fw_cform.style.top)-e.clientY;}}function fw_DHTML_popup(siteID,bizNAME,siteURL){    site_ID = siteID;    site_URL = siteURL;    biz_NAME = bizNAME;    var txtInner = biz_NAME + "<br />Website: " + site_URL + "<br />\n";    document.getElementById('fw_feedback').innerHTML=txtInner; document.getElementById('fw_dhtmlpopup').style.display='block';scroll(0,0);}function fw_close(){document.getElementById('fw_dhtmlpopup').style.display='none';}function fw_deselect (){if(window.opera){document.getElementById('fw_deselectOpera').focus();return true;}if(document.selection){document.selection.empty();}else{if(window.getSelection){window.getSelection().removeAllRanges();}}}var fw_cform,fw_posX=0,fw_posY=0;var fw_imageindex=0;var fw_flag=true;document.onmousedown = fw_mouseDown;document.onmousemove = fw_mouseMove;document.onmouseup = fw_mouseUp;document.write('<style type="text/css">\n<!--\n#fw_contact_holder{width:380px; padding: 10px 0 0 10px; background:#ffffcc; border:1px solid black;}\n#fw_contact_holder p, #fw_contact_holder td{color:black; font-family:arial; font-size:12px;}\n#fw_contact_holder a{color:#226644; font-family:tahoma;}\n#fw_contact_holder a:hover{color:#6699aa;}\n.fw_text{height:17px; border:1px solid #aaaaaa; width:200px;}\n.fw_text:hover{background:#f0f0f0;}\n#fw_button{height:20px; border:1px solid gray; background:#dddddd; font-size:11px; font-family:tahoma;}\n#fw_button:hover{background:#f0f0f0;}\n-->\n</style>\n<div id="fw_dhtmlpopup" style="z-index:500; display:none; position:fixed; left:100px;top:50px; width:370px;">\n<input type="hidden" id="fw_deselectOpera" value="" />\n<table cellspacing="0" style="clear:both; border:1px solid; border-color:#999999 #999999 #dddddd #dddddd;"><tr>\n<td id="fw_drag_header" style="background:#004080; cursor:pointer; padding:0;" onmousedown="fw_start_draging()">\n<div style="float:left; clear:left; color:#ffffff;padding:2px 3px 2px 25px; background:url(\'mail/images/icon.gif\') no-repeat; margin:0;line-height:100%;"><big>Inquiry Form:</big></div>\n<a href="javascript:fw_close();"><img style="float:right; border:none; margin:3px;" src="mail/images/close.gif" /></a></td></tr>\n<tr><td style="padding:1px; background:#ffffff; color:black;">\n<div id="fw_contact_holder">\n<div style="clear:both;"><div style="clear:both; margin:10px 0;" id="fw_feedback"></div>\n<table cellspacing="4px" style="width:100%; padding:0 0 10px 10px;">\n<tr><td colspan="2">Use this inquiry form to request information from this company.<br /<br /><br /></td></tr>\n<tr><td><sup>*</sup>Your name:</td><td><input name="name" type="text" class="fw_text" id="fw_contact_name" /></td></tr>\n<tr><td><sup>*</sup>Your e-mail:</td><td><input name="from" type="text" id="fw_contact_from" class="fw_text" /></td></tr>\n<tr><td>Subject:</td><td><input name="subject" type="text" id="fw_contact_subject" class="fw_text" /></td></tr>\n<tr><td><sup>*</sup>Comment:</td><td><textarea name="message" id="fw_contact_message" rows="1" cols="20" class="fw_text" style="height:90px;"></textarea></td></tr>\n<tr><td><input name="Submit" type="button" id="fw_button"  value="Send Message" onclick="fw_mail()" /></td><td>In sending this inquiry you are agreeing to<br />the <a href="javascript:void(0)" onclick="openWindow(\'terms_and_conditions.html\', 550, 350, \'yes\'); return false;" title="">Terms and Conditions</a> of this service.</td>\n</table>\n<p style="color:#c0c0c0; margin:10px 0 5px 0px; text-align:left;">___________________________<br />\n<span style="color:#004422; font-size:11px; margin-left:5px;"><sup>*</sup>Fields are mandatory</span></p>\n</div></div></td></tr></table></div>');
