/*
CheckNotEmpty	( Control, Message )	
ValidEmail		( Control, Message )
showFocus				(Control)
ScreenWidth()
ImageClick()			disable right click
printit()
refresh() 
SelfClose()	
*/
//-----------------------------------
function CheckNotEmpty( Control, Message )	{
	if( Control.value == "" )	{
		alert ( Message );
		Control.focus();
		return false;
		}	return true;	}
//---------------------------????--------
//------------------------------
function ValidEmail ( Control, Message )
{
	var theInput  = Control.value;
	var theLength = theInput.length;
	var goodEmail  = true;
	if (theLength == 0 )	{
			goodEmail = false;
		}	else { 
			if (theInput.indexOf('@', 0)==-1){
					goodEmail = false;
		}		}
	if ( goodEmail == false )
		{		alert ( Message );
				Control.focus();
				return false;
		}	else	{	return true;
}		}

//----------------------------------
function ValidEmail_1 ( Control )
{
	var theInput  = Control.value;
	var theLength = theInput.length;
	var goodEmail  = true;
	if (theLength == 0 )	{
			goodEmail = false;
		}	else { 
			if (theInput.indexOf('@', 0)==-1){
					goodEmail = false;
		}		}
	if ( goodEmail == false )
		{		alert ( "This does NOT look like a valid Email!" );
				Control.focus();
				return false;
		}	else	{	return true;
}		}

//------------------
function showFocus( Control ) {
	Control.focus();	}
//----------------------------------------
	
function evalcat_on(imgName) {
	if (window.document.images) {
		window.document.images[imgName].src = eval(imgName + "2.src"); }	}
// -------------------------------
function evalcat_off(imgName) {
	if (window.document.images) {
		window.document.images[imgName].src = eval(imgName + "1.src"); }	}
// -------------------------------
//----------------------------------------
function  changeLocation() 
{
var a = (window.document.QuickLinkForm.Quick_Links.selectedIndex);
b = window.document.QuickLinkForm.Quick_Links.options[a].value; 
parent.location.href=("/AllPhoto-Service/"+b);
}
//------------------
function SelfClose()	{
		self.close();	}
//-------------------------------
//-------------------------------
function ScreenWidth()	{
	var w = screen.width;
//alert(w)

	if (w<800)
	{alert('Our site optimized for resolution 800x640 pixels. We recommend you to increase the resolution of your monitor if it is possible.');
	}
	}
//----------------------------------------
//-------------------------------
	
	
function newQLoginWindow(page) {
	windowprops = " height=500,width=400,location=no, scrollbars=no,menubars=no,"
	+ "toolbars=no,resizable=no,screenX=20,screenY=25,left=20,top=25";
	window.open(page, "Login", windowprops);	}
	
//-------------------------------
function newFAQWindow(page) {
	windowprops = " height=600,width=550,location=no, scrollbars=no,menubars=no,"
	+ "toolbars=no,resizable=no,screenX=10,screenY=5,left=10,top=5";
//		alert(windowprops);

	window.open(page, "FAQ", windowprops);	}
	
	
	
//-------------------------------
function newAgreemWindow(page) {
	windowprops = " height=750,width=700,location=no, scrollbars=yes, menubars=yes,"
	+ "toolbars=yes,resizable=yes,screenX=10,screenY=5,left=10,top=5";
//		alert(windowprops);

	window.open(page, "Terms", windowprops);	}
	
	
	
//-------------------------------
function newPhotoWindow(page) {
	windowprops = " height=600,width=500,location=no, scrollbars=no,menubars=no,"
	+ "toolbars=no,resizable=no,screenX=10,screenY=5,left=10,top=5";
//		alert(windowprops);

	window.open(page, "Photo", windowprops);	}
//-------------------------------
function newPhoto2Window(page) {
	windowprops = " height=520,width=420,location=no, scrollbars=no,menubars=no,"
	+ "toolbars=no,resizable=no,screenX=10,screenY=5,left=10,top=5";
//		alert(windowprops);

	window.open(page, "Photo", windowprops);	}
	
	
//-------------------------------
function new4_SaleWindow(page) {
	windowprops = " height=840,width=510,location=no, scrollbars=yes,menubars=no,"
	+ "toolbars=no,resizable=no,screenX=10,screenY=5,left=10,top=5";
//		alert(windowprops);

	window.open(page, "Item", windowprops);	}
	
	
//-------------------------------
function newHelpWindow(page) {
	windowprops = " height=350,width=350,location=no, scrollbars=no,menubars=no,"
	+ "toolbars=no,resizable=no,screenX=10,screenY=5,left=10,top=5";
//		alert(windowprops);

	window.open(page, "Help", windowprops);	}
	
	
	
//-------------------------------

//-------------------------------
function newPriceWindow(page) {
	windowprops = " height=500,width=740,location=no, scrollbars=yes,menubars=no,"
	+ "toolbars=no,resizable=yes,screenX=10,screenY=5,left=10,top=5";
//		alert(windowprops);

	window.open(page, "Price", windowprops);	}
//-------------------------------
function newCSCWindow(page) {
	windowprops = " height=480,width=480,location=no, scrollbars=yes,menubars=no,"
	+ "toolbars=no,resizable=yes,screenX=10,screenY=5,left=10,top=5";
//		alert(windowprops);

	window.open(page, "CSC", windowprops);	}
	
//-------------------------------
function NewPrivacyWindow(page) {
	windowprops = " height=450,width=550,location=no, scrollbars=yes,menubars=no,"
	+ "toolbars=no,resizable=yes,screenX=10,screenY=5,left=10,top=5";

	window.open(page, "", windowprops);	}
	

//----------------------------------------

/*
Add-to-favorites Script
Created by David Gardner (toolmandav@geocities.com)
No warranty of any kind comes with this script!
Permission granted to Dynamic Drive (http://dynamicdrive.com) 
to post and feature this script on their DHTML archive
*/

//configure the two variables below to match yoursite's own info

var bookmarkurl="http://www.flowerwholesale.com/"
var bookmarktitle="Potomac Floral Wholesale, Inc"

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
//----------------------------------------
//----------------------------------------
/*
This script is written by Eric (Webcrawl@usa.net)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/

function printit(){  
if (window.print) {
    window.print() ;  
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
}
}
//----------------------------------------
//----------------------------------------

function submitform()
{
  document.myform.submit();
}


//----------------------------------------
// <a href="#" onmousedown=ImageClick();><img src="" // example of using
function ImageClick(){  
var alertString ="All photographs in this site are the exclusive property of the Potomac Floral Wholesale, Inc.,\n digitally marked, "
	+ "and are protected under United States and International laws. \n Thank you."
alert(alertString);
return false;

}
//----------------------------------------